271 questions
2
votes
1
answer
2k
views
Getting Unhanded Exception in Flurl Http call when server is not active
I have copied the exception below. I have connected my Android device through VPN , If VPN connection failed then the FlurlHttp call is giving unhandled exception. I am developing application on ...
2
votes
1
answer
1k
views
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 ...
1
vote
0
answers
643
views
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
...
2
votes
0
answers
713
views
dotnet core shared nuget dependency missing method exception
I have an internal nuget package that depends on Flurl.Http v1.2, which in turn depends on Flurl >= v2.4. An application depends on this internal package, but also depends on Flurl v2.6.
...
-1
votes
1
answer
235
views
REST JSON payload case preservation
Apologies if it has been asked earlier, but I could not find much on this and hence asking here.
I need to have my case preserved in my REST request JSON payload.
I used JsonProperty for the same, ...
4
votes
3
answers
6k
views
How to change Content-Type in Flurl?
I have a .NET Core 2.0 WebApi application in which I have added the "Flurl.Http" (Version 2.1.0) NuGet package to my project.
I am trying to use Flurl to make a simple REST API call to one of Visual ...
3
votes
1
answer
3k
views
Stream a large file from http service
I am writing a component to stream a large (4+ GB) from an HTTP service. The component takes a URL and destination stream. The destination stream could be a filestream or it could be a stream that ...
0
votes
1
answer
466
views
Client Machine : throw NullReference Exception at Flurl.Http.FlurlClient.ReadResponseCookies
Problem occurs only on my client machine. I ran my application on 4 machines without reproduction success.
I would like to ask on advice and help in debug the following exception while using Flurl ...
0
votes
1
answer
1k
views
NullReferenceException when make a PUT request using Flurl
I'm constructing a Url and making an PUT request using Flurl, as follows:
using (var client = new Url("myurl"))
.ConfigureClient(c => c.HttpClientFactory = new CompressHttpClientFactory())
...
2
votes
1
answer
667
views
How to add HttpClientHandler to url?
I have this request handler:
var httpClientHandler = new HttpClientHandler
{
Proxy = new WebProxy(proxy.Address, proxy.Port),
UseProxy = true
};
And:
var url = new Url(hostUrl)
....
0
votes
1
answer
642
views
How to post to a sign-in form with Flurl
I want to represent a signin in a url(i.e. eclass.aueb.gr) to get the source code of the next page(the portfolio of the user).
What i have now, is the code from documentation...
var response = await "...
4
votes
2
answers
3k
views
Handing Get/{id} vs Get/id with flurl
I'm trying to get Flurl to work and I'm stuck on how gets work when passing in an ID.
[HttpGet("Get/{id}")]
public IActionResult Get(int id)
{
// Some something and return
}
The above expects
...
4
votes
2
answers
2k
views
How to include number (hash) character # in path segment?
I have to download a file (using existing Flurl-Http endpoints [1]) whose name contains a "#" which of course has to be escaped to %23 to not conflict with uri-fragment detection.
But Flurl always ...
5
votes
1
answer
3k
views
Custom HttpClientHandler using FlurlClient doesn't use ClientCertificate
I need to add a client certificate to my web requests and tried to achieve it in this way:
Stackoverflow
At the end of this answer the "FlurlClient way" is presented. Using and configuring a ...
0
votes
1
answer
587
views
Flurl AddFile fileName Encoding
I try to use flurl to send a file like this:
public ImportResponse Import(ImportRequest request, string fileName, Stream stream)
{
request).PostAsync(content).Result<...
6
votes
5
answers
14k
views
How to change the HTTP Request Content Type for FLURL Client?
I am using flurl to submit HTTP request and this is very useful. Now I need to change the "Content-Type" header for some of the requests to "application/json;odata=verbose"
public async Task<...
0
votes
1
answer
166
views
Having a little issue with Flurl (are you missing a cast?)
Hello Stackoverflow Users,
I just want to use an API of someone, but he did'nt put a release on github so you have to compile the api for yourself.
The API im trying to use, is using Flurl, i ...
0
votes
1
answer
498
views
Xamarin how to implement into app the igdb api wrapper installed package
I am attempting to build an application for a personal project using Xamarin in Visual Studio for Android. I am using the internet game database igdb.com api to retrieve the required information based ...
10
votes
3
answers
13k
views
C# HttpClient tor socks4/5 proxy?
I can set http proxy with this code:
public class CustomFlurlHttpClient : DefaultHttpClientFactory {
public override HttpClient CreateClient(Url url, HttpMessageHandler m) {
return base....
0
votes
1
answer
2k
views
Flurl (Fluent Url) custom serialization
How do I override Flurl's default behaviour when serializing objects to query string values? E.g. the below code
DateTime date = new DateTime(2017, 1, 2, 3, 4, 5);
Url url = "http://domain.com"....
1
vote
1
answer
2k
views
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 ...
18
votes
2
answers
17k
views
How can I upload a file and form data using Flurl?
I'm trying to upload a file with body content. Is PostMultipartAsync the only way?
On my C# backend code I have this:
var resource = FormBind<StorageFileResource>();
var file = Request.Files....
8
votes
4
answers
11k
views
How to use Polly with Flurl.Http?
Currently I have this request:
await url
.SetQueryParams(queryString)
.SetClaimsToken()
.GetJsonAsync<T>()
I'd like to start using Polly (https://github.com/App-vNext/Polly) now to ...
0
votes
1
answer
656
views
Flurl local host connection refused
I have set up Flurl to run within my Xamarin PCL, and I'm calling off to a Web API I have running in an MVC application.
It seems Flurl can hit my deployed API no problem, but I'm unable to test ...
0
votes
1
answer
1k
views
Flurl exception not being caught
I don't understand why but I'm receiving Flurl Exceptions and those are not being caught by the try/catch block. Any ideas on why that's happening?
Here's the code:
try
{
var x = await Utils....