Connecting app -> api -> ms sql

Hi all,

I'm new to mobile dev, coming mainly from web dev, so have been following tutorials and searching threads to get by so far.

I have a cross platform xamarin forms app which has to get / update data within an ms sql server. I have already created my api as per advice I'd seen here.

Am I right that I should now install a nuget package to help with connecting to my api? Could someone recommend one that would be suitable, ideally with good documentation for get and put commands.

Thanks!

Tagged:

Answers

  • TiagoRodriguesNesTiagoRodriguesNes USMember ✭✭
    edited July 2018

    I don't use any nuget for that...

    why dont you use this?

    var uri = new Uri("yourapiurl");
    HttpClient client = new HttpClient();
    var response = await client.GetAsync(uri);
    if (response.IsSuccessStatusCode)
    {
        ...
    }
    

    In some cases you may want to use PostAsync

Sign In or Register to comment.