RESTful api

Hi all, I am new to Xamarin,(sorry if this question is silly, but im unable to figure it it out after seeing many links and documentations)

https://www.c-sharpcorner.com/article/how-to-fetch-data-from-web-api-using-xamarin-forms/

I am trying to work on API's. Followed the details as in the above link.

Created a login page with email,password entries.

This runs well on a localhost, but I want to set a baseurl(say https://www.sample.com)
and then use GET,POST functions accordingly.

For login, my url should be https://www.sample.com/login/user

how do i do that? I am trying to understand the documentations on api but it is not helping me

Answers

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    Your article will not help you much as it is related to developing an API server. This article should help much more I'd say: https://stackoverflow.com/questions/36458551/send-http-post-request-in-xamarin-forms-c-sharp

  • User_101User_101 Member ✭✭

    Thanks for the link.

    My whole concern is this:

    1. Create a login page, execute the requests and show records
    2. I have a base url (say www.sample.com)
    3. Login API is POST:login/user
    4. to retrieve users:, API is GET: user/get-request
    5. I need to send x-auth-token in header whose token is received in login api response.

    I have re-read the documentations many times, and its just confusing me badly
    I have seen tutorials, but at the end I am unable to figure how to deploy it. Where exactly do we see the output? on web/mobile?

    Sorry if the queries are silly, but please help it out

  • XavierPerseguersXavierPerseguers CHMember ✭✭✭

    Looks like you have little to no knowledge at all. That's asking too much to get full explanation in a forum.

    I can only recommend you to do the same as I did when I started to learn Xamarin.Forms a few years ago, have a look at all the sample apps here: https://developer.xamarin.com/samples/xamarin-forms/all find one that is "similar" to what you want to do and adapt from that point.

    You should then know enough to either ask specific questions here or find answers on your own by googling what you search for, most of the time and at least for simple stuff, you should be able to find answers on your own.

    Good luck!

Sign In or Register to comment.