I
I
Innokenty Ivanov2014-12-19 15:16:27
Microsoft
Innokenty Ivanov, 2014-12-19 15:16:27

How to work with REST API in Windows for smartphones?

I am writing an application in HTML + JS on WP 8.1 There is a server with a REST API. I want to teach my application to communicate with the server via REST. Well, you understand - I give him a line, he gives me a line. Windows Phone has HttpClient and Sockets for this . Tried this and that, but crooked hands and / or session does not allow you to go far.
Sockets, for example, only work with hosts within the local network. HttpClient can in GET, POST, PUT but not in REST.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Philipp, 2014-12-19
@zoonman

GET, POST, PUT and DELETE are REST.

K
koshachy, 2014-12-21
@koshachy

If you don't mind using third-party libraries, there are good REST libs that can make your life easier.
Let's say I used RestSharp in a project under 7.8. You can download it as a NuGet package or look here: restsharp.org
PS There are other solutions for REST for Windows Phone, dig into NuGet or look for raw ones on GitHub, for example.

R
Razaz, 2015-03-14
@Razaz

HttpClient just makes it easy to use REST services.
REST is not a protocol, but an approach.
Calling a Web API From a .NET Client in ASP.NET We...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question