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

Is there any way to get upload file percentage using Flurl library?

I am uploading some file to using web API and I am using Flurl for that but I am not getting any way to get upload percentage or any information that can help me to get upload file percentage.
MoonTech
  • 11
  • 6
1
vote
1 answer

Flurl & xUnit doesn't Catch Exception using await

I'm setting up a consumer for a WebAPI and writing some unit tests. The 'act' portion of my test is as follows: var dta = await service.AuthenticateAsync(customerId, userName, password, machineId); try { …
sfaust
  • 2,089
  • 28
  • 54
1
vote
1 answer

Specifying content language for JSON request with Flurl?

Issue I would like to POST a JSON request using Flurl with the content header Content-Language specified. I already managed to set the content type (Content-Type) without any issues: string response = await…
Daniel Fürst
  • 99
  • 2
  • 6
1
vote
1 answer

How to do JSON POST

I would like to make a small script that will retrieve a result in JSON. For that I will use C# and Flurl however I am blocked on a little step:/ As for the parameters (username & password) I have already tried with postman and it works. Now I'm…
Digitag
  • 235
  • 3
  • 5
  • 11
1
vote
2 answers

Replay an HttpCall From Flurl

I'm writing an error handler to handle token refreshes. When I get an expired_token error I'm refreshing the token and I'd like to replay the request but I'm not sure of how public async Task HandleErrorAsync(HttpCall call) { var exception =…
johnny 5
  • 19,893
  • 50
  • 121
  • 195
1
vote
1 answer

ASP.NET Web API possible deserialization issue while using flurl

I have a ASP.NET(C#, .NET 4.6.1) Web-Api-GET function which returns a complex object instance and is of generic type. Here is the return type definition (Note that the classes are much expansive in reality). public class FileProcessInstance { …
1
vote
1 answer

Control by response content type?

I've been handed an API that is not pretty ... i.e. it always returns a 200 but Content-Type: application/pdf when successful and Content-Type: application/text with some json in the body when it is not successful. Does flurl provide any means to…
David
  • 19,389
  • 12
  • 63
  • 87
1
vote
1 answer

Using custom protocol

I would like to use another protocol than http(s):// in particular i want to build a URL that begins with vrchat:// but for some reason it always kills the second / var url = "vrchat://".AppendPathSegment("launch"); if…
Bluscream
  • 255
  • 1
  • 3
  • 18
1
vote
1 answer

Xamarin.IOS Flurl.Http Reference Not Resolving

I am building a Xamarin.Forms application (.NETStandard 2.0) and one of my projects libraries used by Android, iOS, and UWP projects is using Flurl.Http. - MySolution | - My Android Project | - My iOS Project | - My UWP Project | - Proj A lib | -…
pixel
  • 9,653
  • 16
  • 82
  • 149
1
vote
1 answer

Remove/ignore ServicePointManager.SecurityProtocol on HTTP requests

I am working on a C# .NET application that requires communication with different services on different servers. I have no part on the server's configuration, so I have to work with the security demands that they have. All of the communication is…
Nicole
  • 107
  • 1
  • 2
  • 12
1
vote
1 answer

Keep PHP Sessions alive between two requests using C# HttpClient

I want know if it's possible to keep PHP sessions alive between two requests... I do the requests using Flurl plugin: public const string ApiUrl = "http://localhost/z/api.php"; public static string MethodName() { using…
z3nth10n
  • 2,341
  • 2
  • 25
  • 49
1
vote
0 answers

UWP Flurl.Http Request Entity Too Large (Error 413)

I use Flurl.Http in UWP and I can make a request to upload my photo to the server: IBuffer buffer = await Windows.Storage.FileIO.ReadBufferAsync(file); string res = ""; try { res = await…
1
vote
1 answer

Build URI from string with special characters (SVN folder)

I need to remotely create directories on an SVN repository. The folders can contain special characters e.g. the vendor, driver and version directories in my example can contain one or more plus ("+") characters. DoDontEscape() just combines the…
BertAR
  • 425
  • 3
  • 18
1
vote
4 answers

"Unexpected character exception" when making GET request to StackExchange API using Flurl

I have created a console application in which I'm making a simple GET request to the Stack Exchange API to fetch some comments. I'm using Flurl. This method is called from Main private static async Task GetComments() { dynamic d = await…
adiga
  • 34,372
  • 9
  • 61
  • 83
1
vote
1 answer

How to post multipart/form-data in uwp using flurl

I'm using flurl in uwp, and want to post an image file to the server. The server api needs a parameter "image_file", a binary file, need to post using multipart/form-data. Now I have a StorageFile, how to post it? string res = ""; try …
Vincent
  • 3,124
  • 3
  • 21
  • 40