Questions tagged [restsharp]

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

RestSharp takes the pain out of calling REST services from .NET. This library takes care of the quirks in .NET's HTTP classes, handles deserialization cleanly, simplifies making asynchronous calls, and just makes it really easy to implement calls to REST services from inside your application.

RestSharp comes with a built-in JSON serializer. The default serializer has been compatible with the Json.NET project but this compatibility has been given up since release 100.3.

Installation Installing RestSharp can most easily be done using its NuGet package:

Install-Package RestSharp

Resources

2486 questions
0
votes
0 answers

How to send on my Web Api ASP.Net Core 6.0 file with two params from WPF app C# using RestSharp STATUS CODE ERROR 44

I have method in my API which receives a file, int and string params. Also I have a desktop WPF app (written in C#) where user after choosing some options click on button and app create request to API using RestSharp. In this request I need to…
Sandman
  • 13
  • 4
0
votes
1 answer

Multi thread on restsharp API post method

I've got this piece of code that I am looping 100 times. As you can see below the number of loops is declared in the response I get from GET method. So it changes over time depending which number is inside the GET response body. Inside the body I…
Mrks
  • 45
  • 1
  • 2
  • 14
0
votes
0 answers

Client Certificate not running on Production

I have configured a X509 Certificate using RestSharp on a C# Web application running on .NET Core 3.1. I am able to receive a 200 on all endpoints when on Development, however when published on IIS. The system is unresponsive. Any guide on where I…
Nickson
  • 135
  • 12
0
votes
0 answers

Placing X509 Certificate as request header on API

I have an endpoint to which I would like to include the X509 certificate that I have just installed as a Current User. I am making use of RestSharp. Below is the code snippet. I would like to find out the best mechanism to do so. I have tried a…
Nickson
  • 135
  • 12
0
votes
1 answer

'RestClient' does not contain a definition for 'Execute'

I have been working on getting an api authentication to work and I am currently stuck on getting the response to execute to show up in a text box. { private void button1_Click(object sender, EventArgs e) { string user =…
Nic Bowles
  • 19
  • 1
  • 3
0
votes
1 answer

How to use async calls in WPF event handlers

I have this event handler in WPF with async call. private void Button_Click(object sender, RoutedEventArgs e) { var folderStructure = restApiProvider.GetFolderStructure(); } Here is the implementation of GetFolderStructure(): public async…
Pozzi Userpic
  • 347
  • 8
  • 30
0
votes
0 answers

Using RestSharp to aend files between to API's on Kubernetes

So I have to API's running on Kubernetes. One has a controller function as such: string filePath = "/blobs/data/runsession/" + folderName; if (!Directory.Exists(filePath)) return null; var tempFile = Path.Combine(Path.GetTempPath(),…
Mr.Gomer
  • 501
  • 5
  • 14
0
votes
0 answers

Problem to make external requests with restsharp

At first the problem is simple but I'm wasting weeks with this. I have a WEB API developed in .NetCore and inside it I make requests to other APIs, locally I don't have any problems, but when I upload the application to the server and I see the…
0
votes
1 answer

Sending HTTP request to Logic app fails with " Property selection is not supported on values of type 'String'

So I have a fairly simple logic app that does a task for me, and I have a HTTP trigger on the task with a JSON object that it expects. I am calling that logic app trigger from C# as follows : var postData = new QERestartModel { …
evolmonster
  • 237
  • 1
  • 5
  • 16
0
votes
1 answer

RestSharp issues integrating with zscaler product will not work on IIS Server 2012 R2

Our organization is removing our proxy web servers and integrating Zscalar. We were informed that all we had to do is remove the proxy property/settings. So I have removed the proxy setting from my code and it seems to work fine locally but it…
0
votes
1 answer

After sending HttpRequest with RestSharp and Reading Cookies, When I pass cookie list to another function some are missing

So like the title says, I send the bootstrap request and receive 7 cookies back from it. I verified in debugging that first function is getting all 7 cookies, however when Function #2 starts executing, there's only 4 cookies in the collection and…
Zac Migues
  • 13
  • 2
0
votes
0 answers

Unable to establish SSL connection to ejabberd using RestSharp, " Received an unexpected EOF or 0 bytes from the transport stream" error

Me and my collage group have set up an ejabberd server in a docker container for a chat application and Im attempting to call the ejabberd api from a C# RestSharp call. the C# code is: public async Task LoginAsync(LoginDTO user) …
0
votes
1 answer

Post JSON Object RestSharp v107

I have to post this json data: JSON.stringify(dataRest)…
Federico
  • 81
  • 2
  • 7
0
votes
2 answers

Unable to connect and get data from remote local Rest API with VPN proxy

I'm trying to connect to a remote local server to get data from their Rest API. I'm on a ASP.NET MVC project and using RestSharp. When I establish VPN connection to the remote local server (via default Windows VPN connection), I'm be able to use…
kkakkurt
  • 2,790
  • 1
  • 30
  • 33
0
votes
1 answer

Why am I receiving 401 Unauthroized from CardPoint API when using test credentials

I am trying to test CardConnect's API, and whenever I make a request to https://fts.cardconnect.com:6443/rest/auth I receive an unauthorized response. I've tried rolling back the version of rest sharp to an older version, but that didn't seem to…
murtruby
  • 1
  • 2