summaryrefslogtreecommitdiff
path: root/Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 17:17:46 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 17:17:46 +0000
commit0440c722a221b8068bbf388c1c0c51f0faff0451 (patch)
tree169cbf90c50ff7961db82ecb606c50c2a45a1688 /Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs
parent225aa1499e37faf9d38257caabbadc68d78b427e (diff)
downloadgestor-master.tar.gz
gestor-master.zip
some dllsHEADmaster
Diffstat (limited to 'Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs')
-rw-r--r--Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs b/Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs
new file mode 100644
index 0000000..de15cd1
--- /dev/null
+++ b/Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Net.Http;
+
+namespace Gestor.Common.Helpers;
+
+public static class HttpHelper
+{
+ public static HttpRequestMessage CreateRequest(this Uri requestUri, HttpMethod httpMethod, Version httpVersion = null)
+ {
+ //IL_0000: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0005: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0024: Expected O, but got Unknown
+ return new HttpRequestMessage
+ {
+ Version = (httpVersion ?? HttpVersion.Version11),
+ RequestUri = requestUri,
+ Method = httpMethod
+ };
+ }
+
+ public static FormUrlEncodedContent Encode(this List<KeyValuePair<string, string>> keyValuePairs)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ return new FormUrlEncodedContent((IEnumerable<KeyValuePair<string, string>>)keyValuePairs);
+ }
+}