Skip to main content

Questions tagged [restsharp]

RestSharp is a simple to use REST client library for .NET

0 votes
0 answers
24 views

In latest version of RestSharp from 106.12.0 to 111.3.0 has error Null reference exception at Execute #2242

Getting Error at RestSharp.HttpRequestMessageExtensions.g__AddHeader|0_2(Parameter parameter, HttpHeaders httpHeaders) at RestSharp.HttpRequestMessageExtensions.c__DisplayClass0_0.b__1(Parameter x) ...
Tauqeer Fatima's user avatar
0 votes
0 answers
6 views

can Restsharpsigned 105.2.3 nuget package upgrade to Resharp 111.4.0 without any major changes?

I have read that Resharp does not provide support for RestSharpSigned 105.2.3. I wanted to update it to RestSharp 111.4.0. But I dont want to do ant major changes. any good link or support to read ...
Md Ahteshamul Hussain's user avatar
0 votes
1 answer
47 views

RestClient as Singleton

The documentation of RestSharp contains the following section: RestClient lifecycle Do not instantiate RestClient for each HTTP call. RestSharp creates a new instance of HttpClient internally, and ...
Odrai's user avatar
  • 2,243
1 vote
1 answer
62 views

Using Polly v8 and RestSharp, how would I build a Generic ResiliencePipeline to account for response header retry-after, exceptions, and logging

I have an API client class built using _client = new RestSharp.RestClient(...); with methods of this form: public async Task<TResponse> PostAsync<TRequest, TResponse>(string resource, ...
Myster's user avatar
  • 18k
0 votes
0 answers
25 views

Ability to set ClientCertificates after instantiating RestClient or custom Factory?

Our .NET application currently uses RestSharp v106 and Ninject. It uses client certificates to authenticate the user with a secured server. The user starts the application, selects one of the ...
lippertsjan's user avatar
0 votes
0 answers
30 views

Get octet-stream with ExecuteAsync from RestSharp without headers

I use RestSharp in version 111.2.0. All our requests are build in this way: internal async Task<byte[]> GetFileAsync(int documentId) { RestRequest request = new RestRequest($"{_apiPath}/...
Marcel Grüger's user avatar
0 votes
1 answer
63 views

crypto.com exchange C# API - How to

crypto.com exchange API has close to no documentation available, at least for C#. I am trying to get as little as the account summary, and failing miserably. Can we try to have the right functions ...
Franck E's user avatar
  • 729
0 votes
0 answers
10 views

RestSharp || Rest API Automation Testing || ExecuteAsync returning null

I am developing RestAPI automation test case using RestSharp. I am trying sample code to test the API response. Below is my code: var _client = new RestClient("https://reqres.in"); var ...
Shyam's user avatar
  • 57
0 votes
1 answer
16 views

Can we re-use a RestClient for calling different TCP endpoints?

The documentation at https://restsharp.dev/v107/#recommended-usage says: Do not use one instance of RestClient across different API clients. Our use-case is calling callback URLs received in ...
axk's user avatar
  • 5,354
0 votes
0 answers
19 views

Is there a way to run a Postman collection directly from C# code?

I need to automate some APIs using RestSharp. I have a Postman collection with all the APIs. I was wondering if there is a library available out there that reads a Postman collection and executes API ...
Jaideep Dhumal's user avatar
1 vote
1 answer
49 views

working in postman ,but not working from vb.net code,giving internal error

when trying to send the request through postman ,works fine . but gives the following error ,when using it direct from vb.net code we are using Lib RestSharp and version 106.15.0.0 the error ...
adelaraby's user avatar
0 votes
3 answers
42 views

OAuth1Authenticator class not found

I'm trying to use OAuth 1.0 authentication with RestSharp. Visual Studio can't seem to find the OAuth1Authenticator class. What's causing this issue? using RestSharp; using RestSharp.Authenticators....
Johnny Tamborrino's user avatar
0 votes
0 answers
30 views

RestSharp fails when reusing the HttpClient

The following code (last line) fails in the latest update (NuGet 111.0) RestClientOptions options = new RestClientOptions(webserviceUri); options.Authenticator = new JwtAuthenticator(AppInfo.Token); ...
Roman's user avatar
  • 15
0 votes
2 answers
79 views

How to reuse RestSharp RestClient instance for many requests that do not have same base URI?

RestSharp Documentation I can use the HttpClient instance created without any base URI, and add all details in HttpRequestMessage to reuse the HttpClient instance. class Example { private static ...
subject-q's user avatar
  • 129
0 votes
1 answer
62 views

How to configure RestSharp test to run on AzureDevOps

Its my first time of implementing a test framework with RestSharp + NUnit. I have not seen any information on Restsharp page stating it support for AzureDevOps. I just wanted to know anyone had ...
E-Test's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
168