-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecated ablyrest#Request method, refactored to RequestV2 method
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,6 +308,13 @@ internal async Task<HttpPaginatedResponse> HttpPaginatedRequestInternal(Paginate | |
return await ExecuteHttpPaginatedRequest(request, requestParams, HttpPaginatedRequestInternal); | ||
} | ||
|
||
[Obsolete("Use RequestV2 instead")] | ||
public async Task<HttpPaginatedResponse> Request(string method, string path, Dictionary<string, string> requestParams = null, JToken body = null, Dictionary<string, string> headers = null) | ||
Check failure on line 312 in src/IO.Ably.Shared/AblyRest.cs GitHub Actions / check (net6.0)
Check failure on line 312 in src/IO.Ably.Shared/AblyRest.cs GitHub Actions / check (net6.0)
Check failure on line 312 in src/IO.Ably.Shared/AblyRest.cs GitHub Actions / check (net7.0)
Check failure on line 312 in src/IO.Ably.Shared/AblyRest.cs GitHub Actions / check (net7.0)
Check failure on line 312 in src/IO.Ably.Shared/AblyRest.cs GitHub Actions / check (net6.0)
Check failure on line 312 in src/IO.Ably.Shared/AblyRest.cs GitHub Actions / check (net6.0)
|
||
{ | ||
var httpMethod = new HttpMethod(method); | ||
return await Request(httpMethod, path, requestParams, body, headers); | ||
} | ||
|
||
/// <summary> | ||
/// Make a generic HTTP request against an endpoint representing a collection | ||
/// of some type; this is to provide a forward compatibility path for new APIs. | ||
|
@@ -318,7 +325,7 @@ internal async Task<HttpPaginatedResponse> HttpPaginatedRequestInternal(Paginate | |
/// <param name="body">(optional; may be null): a json string RequestBody. It will be sent as a json object.</param> | ||
/// <param name="headers">(optional; may be null): any additional headers to send; see API-specific documentation.</param> | ||
/// <returns>a page of results.</returns> | ||
public async Task<HttpPaginatedResponse> Request(string method, string path, Dictionary<string, string> requestParams = null, string body = null, Dictionary<string, string> headers = null) | ||
public async Task<HttpPaginatedResponse> RequestV2(string method, string path, Dictionary<string, string> requestParams = null, string body = null, Dictionary<string, string> headers = null) | ||
{ | ||
var httpMethod = new HttpMethod(method); | ||
JToken requestBody = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters