displayname
displayname

Reputation: 1363

Difference between HTTP Client and REST Client

I am a bit confused, whether there is any difference between the terms "HTTP client" and "REST Client"?

For example, I have found some libraries for Android that look like they were designed for consuming REST services, yet they call themselves an "HTTP client" (Retrofit) or "HTTP library" (Volley).

There is also for example a library that call itself "HTTP/REST client library" (jus for Android).

I will really appreciate if someone could clarify this matter.

Upvotes: 30

Views: 40972

Answers (3)

ozgur-git
ozgur-git

Reputation: 51

Rest client to http client is like ORM to raw SQL. Using a rest client, you can directly get your queries as objects in your program.With a http client you must parse and convert the response manually.

Upvotes: 5

displayname
displayname

Reputation: 1363

enter image description here

To answer my own question:

  • HTTP client is a client that is able to send a request to and get a response from the server in HTTP format

  • REST client is a client that is designed to use a service from a server and this service is RESTful.

  • in most cases that I saw on the web, what is called REST client is actually a HTTP client, since it uses HTTP only and can communicate with a HTTP server which provides services that are not RESTful

Upvotes: 40

sschrass
sschrass

Reputation: 7156

I think your second bullet point is true, beside it is not about functionalities, but about semantics. So REST describes how HTTP should be used, expressed by the data transferred (Links). Both (HTTP and REST) are not bound to a specific format like XML or JSON. Albeit JSON is polular, you could still transfer plain old HTML.

Have a look at What is the difference between HTTP and REST?

Upvotes: 3

Related Questions