Hi, I'm trying to write a xamarin library/sdk and it is supposed to call an api using refit but I keep getting this error System.Net.Http.HttpRequestException: Connection refused ---> System.Net.Sockets.SocketException: Connection refused System.Net.Http.HttpRequestException: Connection refused ---> System.Net.Sockets.SocketException: Connection refused
Please how am I supposed to go about this?
More details about the error is here: stackoverflow.com/questions/58764379/how-to-call-a-rest-api-using-refit-in-a-xamarin-library-sdk
Answers
Can you make the call using postman?
What is the api call supposed to return??
Yes I did, it even worked when I called the api directly from a demo app I did. But calling through the sdk doesn't work
Here is the guide that demonstrates how to interact with a rest api using Refit step by step.
Check the link:
https://xamgirl.com/consuming-a-restful-web-service-in-xamarin-forms-using-refit-part-1/
Hi @Jarvan, I used the tutorial. And It works when I make API calls from an app. But still doesn't work in a library, when I call my library/sdk function to make the same API call it doesn't work