Questions tagged [flurl]

Flurl is a fluent URL builder and wrist-friendly HTTP client library for .NET.

Flurl is a modern, fluent, asynchronous, testable, portable, buzzword-laden URL builder and HTTP client library for .NET.

With a discoverable API, extensibility at every turn, and a nifty set of testing features, Flurl is intended to make building and calling URLs easy and downright fun.

Flurl is available on NuGet in two flavors:

  • Flurl.Http includes all features.
  • Flurl for just the URL builder functionality without the HTTP features.
255 questions
1
vote
1 answer

Post with Accept Header .Net Core 3.1 - PagSeguro

I'm trying to integrate with a payment gateway (PagSeguro), according to the documentation, I must use the Accept Header "application/vnd.pagseguro.com.br.v3+json;charset=ISO-8859-1". Trying with the code not…
1
vote
1 answer

Multipart POST to the Joplin REST API using C# and Flurl

I am currently working on a console app to import data into Joplin for Windows 10, using C# and Flurl. Joplin's API description can be found here. I am trying to create a new resource in Joplin for a file on my system, so it can be attached to a…
1
vote
1 answer

Flurl throws FlurlHttpException instead of FlurlHttpTimeoutException

I need to handle the timeout as a special case, but flurl does not give me expected exception on some cases. Here is my simplified code to do so. try { // Call Listener here with the result of the process using (IFlurlClient…
Tolga Evcimen
  • 7,112
  • 11
  • 58
  • 91
1
vote
2 answers

Flurl Client - Is it possible to access the headers from a failed request?

I am using Flurl Client to call a restful API with a post data. There is a validation performed on the server on the data I submit and it returns back a header containing an error message for the user. As the request requirement doesn't satisfy…
Mukesh Bhojwani
  • 2,014
  • 4
  • 20
  • 35
1
vote
1 answer

JsonPatchDocument parm is null on entering API using a flurl client

I'm using Flurl to call my .net core 3.1 API, but the JsonPatchDocument parm is null on entering the API. I can call this same API with HttpClient, and it works fine, but I'm trying to stick with flurl since my other get/put/delete API calls all…
1
vote
1 answer

Using Flurl in web service to handle calls to an outside service

I wanted to put a situation to you to get your thoughts on the use of Flurl; if I have developed a restful api which is designed to support authentication and sessions from multiple users and you part of the operation of the restful service is that…
Matt
  • 11
  • 1
1
vote
1 answer

Use HTTP/2 with flurl

Is it possible to send a get/post..etc request using http 2 with flurl? If not, is there a way to do it? I have tried using Use HTTP 2 with HttpClient in .Net, but I always get WinHttpException: Error 12156 calling…
null
  • 171
  • 1
  • 9
1
vote
2 answers

SocketException existing connection forcibly closed with Flurl

I'm attempting to query the public NPPES NPI registry using Flurl as my HTTP client library, version 2.4.2. After 4-5 successful async requests (debugging by stepping through each request in the loop) it always fails with a SocketException that the…
tNAPA
  • 13
  • 3
1
vote
1 answer

Flurl Testing: How to setup response based on conditions?

I have a method that makes two HTTP calls to two different urls using Flurl. I need to unit test this method in which I want Flurl to respond with two different responses. How can I set this up? My test class is like: public class SUT { public…
kovac
  • 4,945
  • 9
  • 47
  • 90
1
vote
1 answer

Flurl calling IdentityServer4

I'm attempting to call Identity Server 4 with Flurl Im getting a 400 back from the ID server. The credentials etc work when I make the call with PostMan or with the methods available in IdentityModel.Client. I am unsure about the Post i.e.…
S Rosam
  • 375
  • 1
  • 3
  • 16
1
vote
1 answer

Flurl Missing Method Exception?

I am using Flurl to consume an API and for the most part it's working great. However I have some users getting a missing method exception. I'm trying to get a full stack trace from one of the users experiencing it but so far I just have a screen…
sfaust
  • 2,089
  • 28
  • 54
1
vote
2 answers

How to read my custom Flurl headers from HttpCall

How can I read the custom headers I've put on my FlurlRequest throug WithHeader(string name, object value) and the Authorization throug WithOAuthBearerToken(string token) from the HttpCall FlurlClient settings gives us on Func
MFedatto
  • 134
  • 2
  • 16
1
vote
1 answer

Flurl in C# get (407) Proxy Authentication Required error when POST via proxy in Windows Domain User environment

Hi all I am working on a project. how to solve the (407) Proxy Authentication Required error and get through proxy. The project need to POST some data to server via proxy. The proxy enforce credentials so that the application are required to aware…
singer-neu
  • 15
  • 4
1
vote
1 answer

Method not found GetJsonAsync while using Flurl

I am trying to call api using Flurl and here is my request which only fails on my testserver but works on live server and localhost as well PickUp responseAsPickUpPointServiceResponse = null; try { …
DevelopmentIsMyPassion
  • 3,541
  • 4
  • 34
  • 60
1
vote
1 answer

Flurl throws an exception (MoveNext())

I am attempting to call a Web API POST action (.Net Core) from a WinForms app (.Net Framework 4.7) via Flurl. However, when I try to debug the exception Flurl throws, my request doesn't even enter the controller itself. Trying to debug the problem…
Bowser
  • 87
  • 1
  • 7