I tried to get products with the following code:
public static async Task<List<Product>> GetProducts()
{
return await Get<List<Product>>("http://locahost:5919/api/products");
}
But it seems that Get method accepts just relative URLs and I have to pass absolute URL in Api.Base.Url setting in Config.xml file.
I also tried assigning absolute URL via BaseUrl property before return statement, but it didn't make any difference.
Another strange thing is that if I insert a fake URL (e.g. http://www.yahoo.com) as the Api.Base.Url value and run the project, the following error occurs. Error when adding a fake URL for Api.Base.Url
So if we need to make requests to different End Points in different URLs in one project, how can we achieve that?