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
0
votes
1 answer

Refit 6 not working when android project built with unity

I'm using Refit 6 in unity for rest calls but when project is built for Android getting below error. Message: MissingMethodException: Constructor on type 'Refit.Implementation.Generated+*InterfaceName*' not found. Stack…
0
votes
1 answer

post uri argument with refit

I have a class that includes a Uri instance. The class is sent as an argument to REST api [Serializable] public class SomeClass { public Uri Uri { get; set; } } public interface IRefitExample { [Post("/api/example")] Task
Ohad Horesh
  • 4,340
  • 6
  • 28
  • 45
0
votes
1 answer

REFIT: Howto ignore class properties while composing query

I have this problem I don't see a way out: I want refit to ignore some public property while composing a query. Let's say I have this class public class TestClass { [AliasAs("myprop1")] public string Prop1 {get; set;} …
Marco
  • 56,740
  • 14
  • 129
  • 152
0
votes
0 answers

Refit package 502 Bad Gateway error in .Net Core when calling other API

I am getting a strange error when calling an API from other API using Refit library. FYI: My APIs are built using .Net 5. The First API returns 200 response it is just the Refit which is unable to show the response. I have checked the types of the…
Kishan Vaishnav
  • 2,273
  • 1
  • 17
  • 45
0
votes
2 answers

Refit Api 500 exception at Refit.RequestBuilderImplementation on deployed app only

I have a .net 5.0 Blazor serverside web app that calls a .net 5 Api via Refit. When I run the app locally it works fine, but after i deploy the API and the Web app to Openshift the app loads and does the initial get fine, but if i try to update one…
MicroMan
  • 1,988
  • 4
  • 32
  • 58
0
votes
1 answer

The UI is blocked during refresh ListView for xamarin form

Why is the UI blocked when I load data from the server using an async request as follows: public ObservableCollection VideoFiles { get; private set; } = new ObservableCollection(); private void LoadVideoFiles(string categoryId…
Domestos
  • 29
  • 5
0
votes
1 answer

Refit saying it cant find the authentication method yet it works in swagger

I am trying to use Refit but am having an issue it says its cant find my authenticate method when trying to login a user form the client side. Refit is a strongly typed httpclient replacement. Im wondering is it cause I'm using the FromBody…
c-sharp-and-swiftui-devni
  • 3,743
  • 4
  • 39
  • 100
0
votes
1 answer

Refit Not Using Configured JsonConverter

I'm using Refit for making HTTP calls and it works as expected for request that expects straight-forward JSON structure. We've requirement now wherein the JSON request needs to be represented little differently like below. Class (With below two…
0
votes
1 answer

refit adds url encoded chars to the URI

Here's my method decorated with the refit post attribute [Post("/api/v2​/picking/{taskId}​/details/{id}/updateStatus?pickingStatus={pickingStatus}")] Task UpdateItemStatus(int taskId, int id, PickingStatus pickingStatus); but here is how…
Joe B
  • 738
  • 7
  • 28
0
votes
1 answer

Xamarin Forms Refit Response Is False

I am trying to send data to an api as x-www-form-urlencoded using Refit. But for some reason the response is not being retrieved. I have followed many tutorials step by step by nothing worked. What might be the problem? Thanks in…
Sam
  • 291
  • 3
  • 17
0
votes
1 answer

Using Refit, how to debug deserialization error?

I'm using Refit to consume an XML ReST Web Api. There is some issue with XML deserialization into POCOs (which are annotated with attributes from System.Xml.Serialization) since I get a NullReferenceException in…
Ombrelin
  • 547
  • 1
  • 8
  • 27
0
votes
1 answer

how to resolve this error in xamarin.forms The type 'ObfuscationAttribute' exists in both

The type 'ObfuscationAttribute' exists in both 'Leadtools, Version=21.0.0.0, Culture=neutral, PublicKeyToken=9cf889f53ea9b907' and 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' I'm just installed…
Dev
  • 315
  • 2
  • 16
0
votes
1 answer

Blazor WASM and Refit token

I am using refit in my blazor wasm application, I want to set the token in AuthorizationHeaderValueGetter, the api to which I connect is not written in .net. but I have registered refit in the…
Angelru
  • 150
  • 1
  • 13
0
votes
2 answers

How to use Refit Settings in xamarin forms?

I am creating Android and IoS apps. I use refit for calling the WebAPI. The WebAPI need bearer authorization. But i think that is bad to pass the token every request. I found to do that in the GitHub, but i don't know how to use refit settings in…
0
votes
1 answer

Refit Validation of Responses

Has anyone used FluentValidation in conjunction with a Refit Client? As part of a system I'm working on, I call out to various REST services and I'd like to use FluentValidation to validate the typed responses in a uniform manner. Obviously I could…
Nick
  • 25,026
  • 7
  • 51
  • 83