Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update usage.md
Conform to updated API
  • Loading branch information
mavaddat authored Oct 21, 2023
commit c846418df6f9fe6a6fff431a6bc977358e6ffea0
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ Now, we need to implement the `GetToken` function in the class:

```csharp
async Task<string> GetToken() {
var options = new RestClientOptions(_baseUrl);
using var client = new RestClient(options) {
var options = new RestClientOptions(_baseUrl){
Authenticator = new HttpBasicAuthenticator(_clientId, _clientSecret),
};
using var client = new RestClient(options);

var request = new RestRequest("oauth2/token")
.AddParameter("grant_type", "client_credentials");
Expand Down