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
1 answer

RestSharp call to eBay oauth2 user token

I am trying to get eBay user tokens for my users using the identity api. I finally got it to work in Postman. Converted the call from Postman to a restsharp call from a vb.net test app. The Postman call works, the VB call returns "404 Not Found".…
DougM
  • 109
  • 3
  • 16
0
votes
2 answers

Restsharp 107.x ExecuteAsync upload file to uploadsession fails (GraphAPI Sharepoint), 106.x does work

I have my below code which works proper on 106.15, I get a succesfull status. Project is Visual Studio 2022 (.Net 4.8) accessToken = GetAccessToken() Dim rRequest As RestRequest Dim rClient As RestClient Dim rResponse As RestResponse Try Dim…
Co Akker
  • 11
  • 2
0
votes
1 answer

RestSharp v107 Parameter question adding nested JSON / objects

I'm attempting to update my RestSharp calls to v107 and noticed a slight difference in how parameters are added. What I have working in 106 doesn't appear to work in 107. What I have is that I'm adding an object with nested objects to a POST…
Seril
  • 499
  • 4
  • 9
  • 22
0
votes
1 answer

restsharp 107.3.0.0 different signatures with different visual studio versions

I am trying to build using restsharp version 107.3.0.0, the left screen is visual studio 2022 and the right screen is visual studio 2017. The assembly version is the same in both, however visual studio 2017 is only showing some of the…
Shalako Lee
  • 139
  • 1
  • 4
0
votes
1 answer

Why do I keep getting "Missing/Malformed URL Parameters" when consuming my API in C# (RestSharp) with VS 2022?

I'm trying to do a POST request in C#, using RestSharp, in Visual Studio 2022. I tested the API using Postman, which was successful. The API requires a 64-bit encoded Basic Auth (which I have), and a unique API key (which I also have). I then…
0
votes
2 answers

Async method - weird behavior: my app is getting stuck

I have a weird problem with my async method. I made second project in my solution in VS to connect my app to an API (using RestSharp for it). I made dependencies etc. The problem is when I call this method from the UI by clicking a button (it only…
0
votes
1 answer

WebAPI call using RestSharp gives status 404; WebRequest succeeds

I've got a section of code to do a call to an external webapi using WebRequest. I'm trying to update it to use RestSharp instead. What am I missing here to make the conversion? The closest question here to give any sort of idea what might be going…
Ron O
  • 89
  • 7
0
votes
0 answers

dotnet not following system proxy settings

I installed fiddler the other week, and now some HTTPs requests only work when Fiddler is open and running. When Fiddler is not open. I have gone into Windows system proxy settings and confirmed that the proxy server is off. Uninstalling fiddler…
Phalanx
  • 55
  • 1
  • 9
0
votes
2 answers

RestSharp PATCH API call to update Azure Devops work item throwing BAD Request - "You must pass a valid patch document in the body of the request."

I am using RestSharp v107. I want to update Iteration Path of a test case. I am able to update it with Postman but using RestSharp I am getting "BAD Request" - "You must pass a valid patch document in the body of the request." Azure Devops Update…
KR Akhil
  • 877
  • 3
  • 15
  • 32
0
votes
1 answer

How to get data response when Exception produced using the new V107 RestSharp c#?

i am using the new RestSharp V107 version with net 5.0. I am calling a custom Web API. This Web APi, when the request is not authorized responses with an httpcode 401 and this information in the body (extracted from a request made in…
0
votes
2 answers

Post method uing RestSharp got error in return request

I am install RestSharp -Version 107.0.1 using nuget, and i add below code getting error in return request Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim client As RestClient = New…
Aravind Aravind
  • 179
  • 1
  • 10
0
votes
1 answer

How to capture response after calling REST API?

I am using RestSharp to call REST API as public async Task getoutput() { var client = new RestClient("...."); var request = new RestRequest("....."); var response = await client.ExecuteAsync(request); return…
blac040
  • 127
  • 2
  • 9
0
votes
1 answer

Error showing while using RestSharp RestClient method

My API is calling REST API using RestSharp and Code looks like this var runRequest = { Contains my JSON} var client = new RestClient("....."); var request = new RestRequest("....", Method.Post); string AuthHeader = "..."; …
blac040
  • 127
  • 2
  • 9
0
votes
2 answers

RestSharp webservice Further requests

I need help ... When I use Postaman the 2 requests I make work correctly, but this code of mine only returns me the authentication correctly but when I create a new request, it does not return anything. The response_1 content returns this error: "{"…
Sergio
  • 138
  • 7
0
votes
1 answer

Use RestSharp to get MS Graph token

I am new to using MS Graph and the new version of RestSharp. I put together a simple console app in VB.NET to learn the process. Have spent way too much time looking at solutions on the internet, but not getting the answers I want. The ultimate goal…
DougM
  • 109
  • 3
  • 16
1 2 3
99
100