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

How can I get Access_Token from Flurl

I'm developing an app, I have a backend server Azure API App that uses Owin Token Bearer. I'm trying to Login to my backend and get token back like in my web client. I can login in successfully but there is no token in the response message. I have…
Siphamandla Ngwenya
  • 2,696
  • 1
  • 16
  • 21
1
vote
0 answers

Exception handling in asp net core

I'm looking for some guidance on how to best handle exceptions in asp net core. Based on these docs from microsoft I've setup the UseStatusCodePagesWithRedirects middleware. This works for things such as 404's. However for API requests within my…
Michael Esteves
  • 1,445
  • 3
  • 21
  • 38
1
vote
1 answer

Flurl https problems - ServicePointManager.ServerCertificateValidationCallback

making a call to a https endpoint with "Flurl library" (on my developing machine) i get an error so i added the "famous" ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; to skip the certificate validation. This…
pinale
  • 2,060
  • 6
  • 38
  • 72
1
vote
1 answer

Who getting mjpeg stream from ip camera in uwp with Fluent HTTP

First of all, i'm new an http and mjpeg-stream, so it is very possible that I only have a comprehension problem. Maybe someone can help me here anyway. I had an problem to get the mjpeg stream from my ip camera. The link for calling the stream works…
1
vote
1 answer

in FlUrl I try to use EnableCookies() and it throw a null reference exception

when I try to execute: using (var fc = new FlurlClient().EnableCookies()) { var resp = "http://somesite.com".GetAsync(); // var getResp = await "http://api.foo.com".GetAsync(); …
FabianSilva
  • 405
  • 6
  • 18
1
vote
0 answers

What's wrong with my implementation of Flurl?

I'm using Flurl to query an API and I'm experiencing some very odd behaviour. namespace StravaAPI { public class StravaAPI { public StravaAPI() { _Client = new FlurlClient().WithOAuthBearerToken(ACCESS_TOKEN); …
Antony Smith
  • 43
  • 1
  • 9
1
vote
1 answer

Post image base64 using Flurl

I'm trying to post simple request using Flurl. But there is an exception, because takenPicture string is too large. Is there any way to post large string using Flurl? System.UriFormatException: Uri is longer than the maximum 32766 characters. var…
1
vote
2 answers

Flurl.http PostJsonAsync disappears

I have a class that is posting to an API which is working in my unit tests but not my MVC controller. In the tester the following line works just fine but when call it in my MVC application I cannot step beyond the following line. public async…
Aaron
  • 1,042
  • 2
  • 12
  • 30
1
vote
1 answer

Is it possible to use Furl.Http with the OWIN TestServer?

I'm using the OWIN TestServer which provides me an HttpClient to do my in memory calls to the test server. I'm wondering if there's a way of passing in the existing HttpClient for Flurl to use.
Ralph Shillington
  • 20,718
  • 23
  • 91
  • 154
0
votes
1 answer

Is there a way to write an HTTP request and then execute it at a later time using Flurl?

I am trying to write a Flurl HTTP request that will be executed at a later time. Here is what I would like to do (C# code): public async void SomeFunction(string url, object someJson, object someUrlEncodedData) { var exampleRequest1 =…
0
votes
1 answer

Third party API works on 2 Requests but always fails with 400 on Third Request

I have a task to connect to a third party API and I'm having a bit of a conundrum that I can't seem to solve. The owner of the third party API insists it is an issue on my end because other clients are able to connect to them just fine. For a brief…
Josh
  • 16,286
  • 25
  • 113
  • 158
0
votes
1 answer

Redirect (302) between endpoints of controller in Blazor WebAssembly Hosted project using IFlurlClient

I am dealing with an issue regarding redirecting in server controller in hosted Blazor WebAssembly project. As an example, I modified default WeatherForecastController to redirect one endpoint to another. [HttpGet] public IActionResult Get() { …
0
votes
1 answer

How to write a proper C# GET using Flurl

How do I write my Flurl code to obtain this result, please ? a. See, I have the header "Authorization" as in this image: b. And I have these values in the body: With these, my Get obtains this result So in C# I have this: string clientID =…
Alex
  • 157
  • 8
0
votes
0 answers

Timeout issue when communicating with API in C# application

I have a C# application that communicates with an API. I'm encountering a timeout issue when making requests to the API. The specific error message I'm receiving is: ---> Flurl.Http.FlurlHttpTimeoutException: Call timed out: GET…
Julian Gr
  • 93
  • 1
  • 9
0
votes
0 answers

How to stop "string exceeds the value set on the maxJsonLength property" error with Flurl Serializer

We have the following code in our c# .Net 4.7 class library project. _policy = CreateTokenRefreshPolicy(); FlurlHttp.Configure(c => { c.JsonSerializer = new NewtonsoftJsonSerializer(new JsonSerializerSettings …
George M Ceaser Jr
  • 1,497
  • 3
  • 23
  • 52