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
0 answers

Flurl http param naming strategy

Flurl doest not format query params based on newtonsoft json namin strategy like body content does, so I created a base class for translate it. public abstract class FlurlBaseQueryParam { public Dictionary ParseQueryParams() …
1
vote
0 answers

Polly Library - how to fallback to alternate domain name

I'm using the Polly along with Flurl to perform GET and POST operations to a variety of endpoints. One of the operations that is done is a POST to ElasticSearch. We have serveral ES clusters, and what I would like to do is this: Policy.TimeoutAsync…
Marc Bernier
  • 2,928
  • 27
  • 45
1
vote
1 answer

How to use two calls on the same session in flurl

I want to use GetAsync to get a token then to use that token in a POST function. Both Get and Post should be made on same session. Here is the GET function: var result = await SA_BaseUrl .AppendPathSegments("ProdOrderConfSet") …
H. Saffour
  • 57
  • 1
  • 1
  • 8
1
vote
1 answer

Using Flurl to send a list of files to an asp.net core's IFormFileCollection

I have an endpoint defined like this: [HttpPost] public async Task Post( ... [FromForm] IFormFileCollection images) { } Posting using PostMultipartAsync works well for individual streams, but how would I use this for a list of…
Kyle M
  • 23
  • 4
1
vote
1 answer

Header propagation with Flurl and DotNetCore

I've really enjoyed using Flurl the last year but have encountered a problem that Im hoping I can solve using Flurl if possible and not resort ripping it out and using IHttpClientFactory and HttpClient from System.Net.Http I've got a DotNetCore 3.1…
1
vote
1 answer

Unit testing - Flurl , How to mock flurl request response?

Main service implementation using flurl Public async Task UpdateOpportunityInfo(string optyNumber, UpdateOpportunityVm model, string token = "") { var result = await "https://api.com/*" …
Yogesh Khurpe
  • 27
  • 3
  • 10
1
vote
0 answers

Stream HttpConnection.ChunkedEncodingReadStream as PDF to browser

How can a HttpConnection.ChunkedEncodingReadStream be stream directly to browser as PDF ?? PDF file can be as large as 200MB. In snippet below, ChunkedEncodingReadStream is saved to temp file first, and then it will be returned to user in…
Lydon Ch
  • 8,637
  • 20
  • 79
  • 132
1
vote
1 answer

Using Steeltoe DiscoveryHttpMessageHandler with FlurlClient

I am looking to switch our HttpClients to use Flurl. However, our HttpClient is currently configured to use Service Discovery via Steeltoe. Basically it's doing this in ConfigureServices: services.AddHttpClient
BrianM
  • 836
  • 9
  • 17
1
vote
0 answers

how to use flurl to get the response body with query string parameters

how to use flurl to get the response body with query string parameters. I tried using Postman and the results were as I expected. but I can't apply it to flurl. var strUrl = await …
Newbie
  • 33
  • 3
1
vote
0 answers

Getting Cookie with Flurl 3.0

I need to call an endpoint to perform and retrieve 3 cookies to call another application's endpoint, and I'm using flurl 3.0 to perform the call. The login is successful, but the cookie session is always empty. If I perform the call with Postman, I…
Sethlans
  • 407
  • 1
  • 5
  • 20
1
vote
0 answers

Flurl Timeout not respected

I use Xamarin Forms app and call my api with Flurl. I tried a lot of different solutions but I always have a timeout arround 10 seconds. I would like 30. My code to setup my flurl client: _client = new FlurlClient(ApiUrl); TimeSpan…
dalton5
  • 915
  • 2
  • 14
  • 28
1
vote
1 answer

POST body null when performing PostMultipartAsync

Digging into sending a multipart POST call using flurl to a client's server. Unfortunately, their server is a black box to us. I'm getting a 400 back, with a generic message, so before I bug them, I need to have all my bases covered. Performing a…
Coyttl
  • 537
  • 1
  • 4
  • 19
1
vote
1 answer

Library design and DI with 3rd party dependencies

I'm writing a library for internal use. The purpose of this library is to abstract away calls to some internal REST API's. Under the hood, I'm using Flurl to make the requests. The library also provides extensions methods that sets up DI (Core Web)…
martinoss
  • 5,268
  • 2
  • 45
  • 53
1
vote
1 answer

Ask - How to use the word 'params' in 'PostJsonAsync' Flurl

I am using flurl to retrieve data in the url. How to use the word params in PostJsonAsync? The problem I get is identifier expected: 'params' is keyword, if I use a word other than 'params' there is no problem. .PostJsonAsync(new …
Kolimondi
  • 87
  • 1
  • 5
1
vote
1 answer

How to set HttpMessageHandler on Flurl calls globally without calling Configure()

I'm building a small library for internal use that relies on Flurl for handling all outgoing HTTP calls. I want to provide the ability for consumers of this library to opt-in to our HTTP call tracing infrastrucure like so: Startup.cs: ... public…
Jon Halliday
  • 395
  • 3
  • 14