question

CastielTR-4177 avatar image
0 Votes"
CastielTR-4177 asked RobCaplan edited

Just simple, no source for xamarin.android

How can I do make httpclient? I cant find the in xamatin.android, all search results for xamarin forms. Problem is I have so questions but google uncle cant find the xamarin.android results. I am so sorry for start with xamarin. You xamarin helpers also do not answer questions in the forums. SO SAD!

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What about var client = new HttpClient(); isn't working for you?

0 Votes 0 ·

1 Answer

JessieZhang-2116 avatar image
1 Vote"
JessieZhang-2116 answered JessieZhang-2116 edited

Hello,


Welcome to our Microsoft Q&A platform!

Yes, you can use HttpClient to consume REST Services.

Representational State Transfer (REST) is a Service, which is based on REST architecture to build the Services on the Web. REST requests are made in HTTP, using the same HTTP verbs that the Web Browsers use to retrieve the Web pages and send the data to the Servers. The verbs are given below.

  • GET - It is used to retrieve the data from the Web Service.

  • POST - It is used to create a new data item in the Web Service.

  • PUT - It is used to update a data item in the Web Service.

  • PATCH - It is used to update a data item in the Web Service, describing a set of instructions on how the item should be modified.

  • DELETE - It is used to delete a data item in the Web Service.

Web Service APIs that adhere to REST are called RESTful APIs and are defined using

  1. A base URL.

  2. HTTP methods, such as GET, POST, PUT, PATCH or DELETE.

  3. A media type for the data, such as JavaScript Object Notation (JSON).

The simplicity of REST has helped to make it the primary method for accessing Web services in the mobile Applications.

Here is a good article about this , you can check it here: Xamarin Android - Consuming REST Services With HttpClient .

And there is sample included in above link, you can check it.

Best Regards,


Jessie Zhang


If the response is helpful, please click "Accept Answer" and upvote it.



Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Check at pls my httpclient code, I think something is wrong,,
92379-adasdasdasdasd.png


0 Votes 0 ·
adasdasdasdasd.png (17.9 KiB)

It seems that above code is not based on xamarin android platform . You can create a xamarin android app.

1 Vote 1 ·

That is exactly what I am say :)

0 Votes 0 ·
Show more comments