Skip to content
Snippets Groups Projects
Commit 3dc6c11b authored by Patrik Paško's avatar Patrik Paško
Browse files

- added generic requests

- default version increased to 3.0
parent 2b05602a
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
public class ConnectionOptions public class ConnectionOptions
{ {
public const string VERSION_2 = "v2"; public const string VERSION_2 = "v2";
public const string VERSION_3 = "v3"; public const string VERSION_3 = "v3.0";
private string url; private string url;
private string token; private string token;
......
using SDK.Exceptions; using SDK.Exceptions;
using System; using System;
using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;
...@@ -32,6 +33,7 @@ namespace SDK ...@@ -32,6 +33,7 @@ namespace SDK
{ {
this.connectionOptions = connectionOptions; this.connectionOptions = connectionOptions;
this.httpClient = httpClient; this.httpClient = httpClient;
this.httpClient.DefaultRequestVersion = HttpVersion.Version30;
httpClient.BaseAddress = new Uri(connectionOptions.Url + "/" + connectionOptions.Version + "/"); httpClient.BaseAddress = new Uri(connectionOptions.Url + "/" + connectionOptions.Version + "/");
ResetHttpClientHeaders(); ResetHttpClientHeaders();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment