271 questions
5
votes
1
answer
5k
views
Posting `multipart/form-data` with Flurl
I am in need to post the following request:
POST http://target-host.com/some/endpoint HTTP/1.1
Content-Type: multipart/form-data; boundary="2e3956ac-de47-4cad-90df-05199a7c1f53"
Accept-Encoding: gzip,...
0
votes
1
answer
2k
views
Flurl & HttpTest: Unit tests fail when Run All, but pass when run individually
Update: HttpTest is not thread-safe, as per the project's GitHub issue. Until the issue is resolved, tests using HttpTest cannot be run in parallel.
I have a really weird pair of test utilizing Flurl ...
1
vote
1
answer
1k
views
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 ...
1
vote
1
answer
499
views
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 ...
0
votes
1
answer
3k
views
PostUrlEncodedAsync with complex object
Hi I'm trying to post an object that is like :
public class myobj
{
public string name {get;set;}
public myEntity myentity {get;set;}
public mySecondEntity mySecondEntity {get;set;}
}
public ...
0
votes
1
answer
1k
views
How to do GET request with parameters in UWP?
using Flurl.Http;
dataMapperSurvey = "url"
var responseJString = await dataMapperSurvey.WithHeader("AUTH_TOKEN", "335351").GetStringAsync();
Here I'm try to hit the url with that specific Auth_token ...
1
vote
2
answers
3k
views
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 ...
0
votes
1
answer
4k
views
How to add content header to Flurl
I would like to know how to add a content header to a flurl-statement.
The onedrive implementation requires me to add a content-type header to the content, and tried every possible solution with no ...
3
votes
5
answers
8k
views
How to do XML POST with FlUrl
FlUrl does a great job in dealing with Json/UrlEncoded requests. However, the documentation doesn't really point out how to handle other request types such as text/xml.
What's the best way to do an ...
0
votes
2
answers
4k
views
How to preserve headers in the Flurl HttpClient
I'm using the Furl.Http wrapper over the .NET Http Client. With each request my API requires a User-Agent and an Authorization header to be sent.
I would like to set that up once, rather than ...
9
votes
3
answers
6k
views
Flurl.Http custom error
I am making an application where a client does requests to a server. The server is written in node.js and the client in .NET using flurl.Http.
When a request on the server fails, it is always usefull ...