271 questions
1
vote
1
answer
621
views
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 ...
0
votes
1
answer
424
views
Dictionaries and Flurl
I wish to access the "front_default" sprite in the PokeAPI for bulbasaur (https://pokeapi.co/).
I have the following collection initializer:
public class PokemonModel
{
public int Id { ...
-1
votes
1
answer
453
views
Add some sort of interface to a Dynamic.ExpandoObject object
I am using a library that return a IList<dynamic> (from a jsonArray), dynamic means not having any intellisense while using such object, I would like to be able to simply define what the dynamic ...
1
vote
1
answer
2k
views
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 ...
1
vote
1
answer
749
views
Post with Accept Header .Net Core 3.1 - PagSeguro
I'm trying to integrate with a payment gateway (PagSeguro), according to the documentation, I must use the Accept Header "application/vnd.pagseguro.com.br.v3+json;charset=ISO-8859-1".
Trying with the ...
0
votes
1
answer
669
views
I can use SocketHttpHandler instead of HttpMessageHandler?
Flurl is configured by default to use HttpMessageHandler. However, my application uses .NET Core 3.1 and I know that this framework has better support for the new SocketHttpHandler class.
So can I ...
1
vote
1
answer
669
views
Multipart POST to the Joplin REST API using C# and Flurl
I am currently working on a console app to import data into Joplin for Windows 10, using C# and Flurl.
Joplin's API description can be found here.
I am trying to create a new resource in Joplin for ...
1
vote
2
answers
2k
views
Flurl Client - Is it possible to access the headers from a failed request?
I am using Flurl Client to call a restful API with a post data. There is a validation performed on the server on the data I submit and it returns back a header containing an error message for the user....
0
votes
1
answer
3k
views
Flurl: Call failed with status code 308 (Permanent Redirect) but no AutoRedirect
I am using Flurl to make REST API calls. I am stumbling on an exception HttpStatusCode 308 because it will not cause an automatic redirect.
`var url = kundenServiceUrl
....
1
vote
1
answer
469
views
Using Flurl in web service to handle calls to an outside service
I wanted to put a situation to you to get your thoughts on the use of Flurl; if I have developed a restful api which is designed to support authentication and sessions from multiple users and you part ...
1
vote
1
answer
589
views
Use HTTP/2 with flurl
Is it possible to send a get/post..etc request using http 2 with flurl? If not, is there a way to do it?
I have tried using Use HTTP 2 with HttpClient in .Net, but I always get WinHttpException: ...
3
votes
1
answer
2k
views
How to use Flurl with instance of HttpClient
Let's say I have an instance of HttpClient which is already configured. And now I want to use it for Flurl requests. I'd like to do something like this:
var poco = await httpClient.GetJsonAsync<...
0
votes
1
answer
3k
views
Flurl: GetJsonListAsync returns list of dynamic objects
I am new to .NET Core and trying to figure things out; practising how to consume APIs with Flurl.
With this endpoint https://jsonplaceholder.typicode.com/posts which returns JSON array, I tried the ...
1
vote
1
answer
767
views
Flurl calling IdentityServer4
I'm attempting to call Identity Server 4 with Flurl
Im getting a 400 back from the ID server.
The credentials etc work when I make the call with PostMan or with the methods available in IdentityModel....
2
votes
1
answer
4k
views
How to verify request body content in Flurl Http in unit tests?
I'm using Flurl Http to make http requests. In the unit tests, I'm trying to verify that the expected content was passed to the sender. I'm trying it like:
httpTest.ShouldHaveCalled(url)
....
4
votes
1
answer
2k
views
What is the correct way to post and save stream response to file using Flurl
I am trying to implement an asynchronous POST file and read the response directly to a file using Flurl. The code below works fine but not sure about the writing stream to file using c.Result.CopyTo ...
3
votes
1
answer
2k
views
IFormFileCollection is null when adding file to Flurl multi-part POST request
I am trying to upload a file using Flurl using AddFile.
The resulting IFormFileCollection is null, although I am able to see the item when looking at Request.Form.Files[0] with the right content ...
0
votes
1
answer
2k
views
Use HttpTest inside asp.net core/grpc integration test
I have a ASP.NET core/gRPC service that I want to integration test.
Inside the grpc services I make Flurl calls to 3rd party web apis.
I want to mock those calls out using Flurl's HttpTest class.
I ...
0
votes
2
answers
6k
views
JSON deserialization error when property name is missing
I am trying to consume an external web service and I am using .NET Core and the Flurl framework. I get a response from the service like below:
[
"Successful Request: 96 Results",
[
{
...
4
votes
2
answers
658
views
Does flurl support graphQL requests?
Is it possible to use flurl to send a post request to a GraphQL API?
I've tried the following, but I'm only getting errors back.
var stringContent = @"query {
webhooks {
...
1
vote
1
answer
774
views
Unit testing a service class with dependency on httpclient response
I have a service-class that gets a FlurlHttpClient injected in the constructor.
It has a public method which makes a call using the httpClient and then parses the response and returns a class. So ...
1
vote
1
answer
1k
views
Flurl in C# get (407) Proxy Authentication Required error when POST via proxy in Windows Domain User environment
Hi all I am working on a project. how to solve the (407) Proxy Authentication Required error and get through proxy.
The project need to POST some data to server via proxy. The proxy enforce ...
0
votes
1
answer
3k
views
Flurl API not sending POST request
I need to post webhook info into my database. That is simple enough and I can do that, but I'm having issues updating a line item that has already been inserted into the database. I figured I could ...
18
votes
10
answers
40k
views
HTTP Request works in Postman, but not in C# code
I want to do a simple HTTP request in C#, but something is not working and all I got is 403 Forbidden status code.
When I try to do same request in Postman, everything works fine.
I tried to run ...
8
votes
2
answers
9k
views
SSL handshake fails in Xamarin
I'm trying to access my RESTful API to retrieve data from a MySQL database. Everything is set up and works perfectly on my C# WPF project. But when using the exact same code in Xamarin Forms (built ...