diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 17:17:46 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 17:17:46 +0000 |
| commit | 0440c722a221b8068bbf388c1c0c51f0faff0451 (patch) | |
| tree | 169cbf90c50ff7961db82ecb606c50c2a45a1688 /Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs | |
| parent | 225aa1499e37faf9d38257caabbadc68d78b427e (diff) | |
| download | gestor-0440c722a221b8068bbf388c1c0c51f0faff0451.tar.gz gestor-0440c722a221b8068bbf388c1c0c51f0faff0451.zip | |
Diffstat (limited to 'Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs')
| -rw-r--r-- | Gestor.Common/Gestor.Common.Helpers/HttpHelper.cs | 31 |
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); + } +} |