Questions tagged [refit]

Refit is a library heavily inspired by Square's Retrofit library, and it turns your REST API into a live interface.

Refit is a .NET library heavily inspired by Square's Retrofit library (JAVA), and it turns your REST API into a live interface. Read more on refit at Github.

204 questions
1
vote
1 answer

Can't connect to api endpoint from mobile app

I created a .NET Core web api endpoint where I can retrieve some images that I want to display in my mobile app. I tested the endpoint locally by navigating to that route and via postman and both are working fine (showing the proper response).…
Euridice01
  • 2,510
  • 11
  • 44
  • 76
1
vote
0 answers

Task still running after Polly forced Timeout

I'm trying to implement a Retry/Timeout procedure to access a webservice, with Polly and Refit. I have a timeout policy of 10 seconds (Polly.Timeout.TimeoutRejectedException on timeout). I have a retry policy of 2 attempts. I have a…
Mattia Durli
  • 757
  • 7
  • 19
1
vote
2 answers

payload is too large when sending byte with refit

here is the client side error Refit.ApiException Message=Response status code does not indicate success: 413 (Payload Too Large). Source=mscorlib StackTrace: at Refit.RequestBuilderImplementation+<>c__DisplayClass14_0`2[T,TBody]. …
1
vote
0 answers

How do I stop Refit encoding my querystring?

I'm using an API that's in beta and it's essentially a querystring for a Mongodb db as a parameter. Refit is encoding my url, which included plenty of curly braces, and their server doesn't like it and it essentially ignores all of my query…
CodingCretin
  • 401
  • 4
  • 9
1
vote
1 answer

Does the refit option in gridsearchcv re-select features?

I'm using gridsearchcv to train a logistic regression classifier. What I want to know is whether the refit command re-selects features based on chosen hyper-parameter C, OR simply uses features selected in the cross-validation procedures and only…
THwang
  • 11
  • 4
1
vote
0 answers

Is there a way to make Refit convert to different model based on Http return code?

I need some help with Refit... I'm building an Xamarin.Android app, and I'm using Refit to make some network calls to some endpoints. Based on the normal functionalitty of Refit, we can make it convert the response to a model or a list of models we…
user3159043
  • 197
  • 1
  • 1
  • 16
1
vote
0 answers

How to send object which contains IEnumerable via Refit on NetCore?

I have to send a request object via Refit which contains 2 IEnumerable and one string, but for some reason I can't send the object forward. I've tried to use all the paramets from the interface. Ex: [Query(CollectionFormat.Csv)] or Multi / Pipes but…
Mircea Mihai
  • 167
  • 1
  • 13
1
vote
1 answer

Refit / API / HTTPS Connection: adding password on header - Is this safe?

I`m setting up a new WebAPI server (ASP NET), we're using HTTPS and checking for a valid password, which is passed through the message header. Server side, I can check if every package is delivered through HTTPS, and if it contains the correct…
Tehort
  • 33
  • 6
1
vote
1 answer

Deserialize xml string to c# Objects

I have this XML returned from a Refit rest service (WorkflowMax API): OKJ000002Callout20970938Big…
David
  • 19
  • 1
  • 8
1
vote
1 answer

How can I convince Refit not to add the xml preamble?

I am a newbie in using Refit. I am using Refit now to call a REST Api that expects xml as input. This works but it seems that Refit automatically adds the well known xml preamble to describe encoding. I want to send the xml element without preamble…
Daan
  • 2,478
  • 3
  • 36
  • 76
1
vote
1 answer

Mimic CookieContainer Behavior with Refit

I'm trying to use Refit to replace an existing HttpClient wrapper class that I wrote a while back. Things are working pretty well in most cases, but there is one case where I need to pass a cookie along with my request. Part of my confusion I…
Hoser
  • 4,974
  • 9
  • 45
  • 66
1
vote
0 answers

Building a pure server-side rest client using core 2 and refit

I'm currently working on a pure server-side solution to consume an existing rest API, authenticated with a JWT token, in ASP.NET Core 2. I have a Core 2 MVC project set up and included refit to to consume the api. What I ideally want to do is to 1.…
1
vote
1 answer

Refit - How to edit mustache template

I'm fairly new to using Refit and C#. I'm trying to edit my RefitStub.g.cs page and I see a message : /* ******** Hey You! ********* * * This is a generated file, and gets rewritten every time you build the * project. If you want to edit it, you…
1
vote
0 answers

How does one use Fusillade without ModernHttpClient in Xamarin Forms?

Considering that ModernHttpClient is not required anymore, how does one go about using Fusillade without it? Thanks
Noel
  • 373
  • 3
  • 15
1
vote
0 answers

SIGABRT when debugging Xamarin async method

I am trying to figure out why this code is crashing on debug mode with Visual Studio for Mac. It runs OK if no breakpoints are set, but when stepping-in, application crashes with the following error message: 2017-10-23 10:26:11.137…