restsharp Questions

3

Solved

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net.Http; using System.Net.Http.Headers; using RestSharp; namespace...
His asked 13/1, 2016 at 20:52

11

I'm using RestSharp to make calls to a webservice. All is well but I was wondering if it would be possible to print the raw request headers and body that is sent out and the raw response headers an...
Enlarge asked 28/3, 2013 at 14:0

10

Solved

I am using postman and making an api post request where I am adding body with x-www-form-urlencoded key/values and it works fine in postman. The issue arrises when I try it from c# using RestSharp...
Festschrift asked 21/7, 2017 at 13:26

1

Hi I am using RestClient from RestSharp nuget package, but I found it does not implement IDisposable. So do I need to dispose it or how to dispose it? The example codes are from Mailgun api: Rest...
Wendelina asked 22/12, 2017 at 11:44

4

Solved

I am calling an API that requires an MD5 hash of the body of the request in the request's header. I am using RestSharp to send the requests. Normally I can check the Request.Parameters for the Bod...
Erased asked 2/7, 2014 at 20:14

8

I have a WPF client using RestSharp and WEB API Service. I try to use HttpBasicAuthenticator as follows: RestRequest login = new RestRequest("/api/users/login", Method.POST); var authenticator = n...
Socorrosocotra asked 5/8, 2015 at 13:5

2

I want check the http traffic with Fiddler, but no any http traffic captured, my testing codes: private static void ByRestSharp() { var restClient = new RestClient("https://jsonplaceholder.typico...
Piperonal asked 21/11, 2017 at 8:27

6

Solved

I have a JSON response that I'm trying to deserialize with RestSharp, and it looks like this: {"devices":[{"device":{"id":7,"deviceid":"abc123","name":"Name"}}, {"device":{"id":1,"deviceid":"def4...
Mclain asked 22/4, 2013 at 21:7

2

I'm trying to send a GET request with a token authentication, but i get an unauthorized response. If i send the same request on Postman, it works. Here's my code : string url = string.Format("{0...
Utile asked 19/3, 2018 at 8:43

4

Solved

Is there any whay that I can get RestSharp to ignore errors in SSL certificates? I have a test client, and the service I connect to does not yet have a valid cetificate. When I make a request now I...
Bluey asked 1/5, 2012 at 12:38

2

I have a C# (Azure function app) project in Visual Studio. .Net 6.0 I updated RestSharp to version 110.2.0, and now I get this error: [2023-04-29T21:34:10.399Z] Executed 'RequestItemsPage' (Failed,...
Bridgettbridgette asked 29/4, 2023 at 21:43

3

Solved

I'm trying to communicate with a server. This server send me a certificate and a private key in order to execute my request successfully. To test the server, I use Postman. So I fill the certifica...
Toolis asked 2/3, 2018 at 12:30

6

Solved

I am using RestSharp (version 104.4 via NuGet) to make calls to a Rest Web Service. I have designed a set of objects (POCO) which matches resources exposed in the API. However, my objects property ...
Kai asked 7/2, 2014 at 17:2

2

Solved

I'm using RestSharp to consume a REST Web Service. I've implemented my own Response object classes to use with automatic Serialization/Deserialization integrated inside RestSharp. I've also added ...
Neusatz asked 26/7, 2016 at 13:21

3

A typical http call using RestSharp looks as follows: var client = new RestClient("http://exampleapi.com"); var request = new RestRequest("someapi", Method.GET); IRestResponse response = client.Ex...
Irreformable asked 26/12, 2015 at 20:42

1

Solved

Using .net 6.0 and RestSharp 110.0.1 when I follow the example from the RestSharp documentation (linked below) I get an error "RestClient.Authenticator cannot be assigned to -- it is readonly....
Encumbrance asked 5/4, 2023 at 19:35

4

I am looking for a way to access the serialized result of the AddBody call. I am using the built in RestSharp Serializer. Example: class Foo { public string FooField; } void SendRecord() { ...
Vanward asked 8/6, 2014 at 15:32

3

Solved

Anybody aware of default timeout value of RestSharp RestClient ?
Hawkshaw asked 3/3, 2015 at 10:32

6

I'm trying to make a webrequest through a proxy on Windows phone 7. From what I can see the Compact Framework does not include the configuring of a proxy for the HttpWebRequest object. I tried usin...
Scissel asked 21/8, 2012 at 8:42

8

I am trying to post JSON in camelCase, and have followed the instructions here: https://github.com/restsharp/RestSharp/wiki/Deserialization#overriding-jsonserializationstrategy public class Camel...
Aires asked 30/9, 2015 at 13:53

5

In a particular case I need to be able to disable compression in the requst/response. Using Firefox RestClient I am able to post some xml to a web service and get some response xml successfully wi...
Radiomicrometer asked 3/7, 2014 at 12:24

1

Solved

I just can't see what I'm doing wrong. I have a certificate that I obtained (not self signed). I have a pfx file and a password. I added the certificate in Postman and the API call works. I try to ...
Dx asked 31/8, 2022 at 1:17

2

Solved

When I run my app in localhost it works fine but when I publish it to Azure my request stop working. Getting the error : "The request was aborted: Could not create SSL/TLS secure channel.&quot...
Rationalize asked 26/1, 2021 at 10:7

4

I am trying to use NTLM authentication for my REST calls to TeamCity using RestSharp. IRestClient _client=new RestClient(_url); _client.Authenticator = new NtlmAuthenticator (System.Net.Credenti...
Labors asked 21/11, 2013 at 11:44

2

I'm trying to implement a third party service on my project and i need to do some authentication to consume their API. To do so i need to execute a POST request on their auth url, the problem is w...
Gris asked 26/7, 2017 at 18:37

© 2022 - 2025 — McMap. All rights reserved.