Click here to Skip to main content
15,029,944 members
Home / Discussions / Android
   

Android

 
AnswerMessage Closed Pin
22-Nov-20 23:21
MemberMember 1499685522-Nov-20 23:21 
AnswerMessage Closed Pin
8-Jan-21 8:09
MemberMember 150117998-Jan-21 8:09 
QuestionMessage Closed Pin
8-Aug-20 23:05
MemberMember 149101908-Aug-20 23:05 
AnswerRe: The popular and free movie viewing app for android? Pin
Richard MacCutchan8-Aug-20 23:06
mveRichard MacCutchan8-Aug-20 23:06 
GeneralMessage Closed Pin
8-Aug-20 23:19
MemberMember 149101908-Aug-20 23:19 
QuestionXamarin Forms App Calling Web API Pin Pin
Kevin Marois20-Jul-20 7:26
professionalKevin Marois20-Jul-20 7:26 
AnswerRe: Xamarin Forms App Calling Web API Pin Pin
Richard Deeming20-Jul-20 21:38
mveRichard Deeming20-Jul-20 21:38 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Kevin Marois21-Jul-20 6:22
professionalKevin Marois21-Jul-20 6:22 
Well that helped, a bit.

Again, I'm just trying to create a small, simple xamarin forms example that connects to a web api. I've read these:
Consume a RESTful Web Service - Xamarin | Microsoft Docs
6 Steps to Consume ASP.Net Core Web API in Xamarin | Syncfusion Blogs

Here's what I have now:
private async Task GetData()
{
    //string url = $"https://localhost:44340/api/Test/GetAll";
    string url = $"https://127.0.0.1:44340/api/Test/GetAll";
    try
    {
        HttpClient client = new HttpClient();
        HttpResponseMessage response = await client.GetAsync(url).ConfigureAwait(false);
        if (response.IsSuccessStatusCode)
        {
            string content = await response.Content.ReadAsStringAsync();
            Items = JsonConvert.DeserializeObject<List<TestDataEntity>>(content);
        }
    }
    catch (Exception e)
    {
        throw;
    }
}

My browser opens and shows the commented out url (https:/localhost:44340). Yet the call to GetAsync throws "{System.Net.WebException: Failed to connect to localhost/127.0.0.1:44340". When I try that URL I get the same exception.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Richard Deeming21-Jul-20 6:56
mveRichard Deeming21-Jul-20 6:56 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Kevin Marois21-Jul-20 6:58
professionalKevin Marois21-Jul-20 6:58 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Richard Deeming21-Jul-20 23:17
mveRichard Deeming21-Jul-20 23:17 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Kevin Marois22-Jul-20 6:45
professionalKevin Marois22-Jul-20 6:45 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Richard Deeming22-Jul-20 7:30
mveRichard Deeming22-Jul-20 7:30 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Kevin Marois22-Jul-20 7:36
professionalKevin Marois22-Jul-20 7:36 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Richard Deeming22-Jul-20 22:09
mveRichard Deeming22-Jul-20 22:09 
Questionandroid studio Pin
Member 1488720211-Jul-20 20:30
MemberMember 1488720211-Jul-20 20:30 
QuestionRe: android studio Pin
Richard MacCutchan11-Jul-20 23:05
mveRichard MacCutchan11-Jul-20 23:05 
AnswerRe: android studio Pin
Richard Andrew x6420-Jul-20 9:50
professionalRichard Andrew x6420-Jul-20 9:50 
GeneralRe: android studio Pin
Richard MacCutchan20-Jul-20 10:03
mveRichard MacCutchan20-Jul-20 10:03 
QuestionFile and App sharing app Pin
AdityaSha8-Jul-20 17:00
MemberAdityaSha8-Jul-20 17:00 
AnswerRe: File and App sharing app Pin
Richard MacCutchan8-Jul-20 22:49
mveRichard MacCutchan8-Jul-20 22:49 
GeneralRe: File and App sharing app Pin
AdityaSha10-Jul-20 1:51
MemberAdityaSha10-Jul-20 1:51 
GeneralRe: File and App sharing app Pin
Richard MacCutchan10-Jul-20 3:11
mveRichard MacCutchan10-Jul-20 3:11 
Questionjava.lang.IllegalArgumentException: Unknown URI: content Pin
Ирина Костић23-Jun-20 13:56
MemberИрина Костић23-Jun-20 13:56 
AnswerRe: java.lang.IllegalArgumentException: Unknown URI: content Pin
Richard MacCutchan23-Jun-20 21:59
mveRichard MacCutchan23-Jun-20 21:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.