Difference between HTTP Client and REST Client
Asked Answered
I

3

29

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).

  • So, is "HTTP client" and "REST Client" the same thing?

  • Or is "REST Client" is an HTTP client with some additional functionalities?

  • What about JSON/XML parser? Are they considered a part of REST clients but not HTTP client?

I will really appreciate if someone could clarify this matter.

Immolate answered 20/4, 2018 at 23:38 Comment(0)
I
38

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

Immolate answered 22/4, 2018 at 7:34 Comment(1)
This is really confusing and I could not find the right answer anywhere. Thanks for sharingArmentrout
G
5

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.

Gambetta answered 9/12, 2021 at 13:44 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Hedelman
G
3

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?

Geometer answered 21/4, 2018 at 10:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.