O GoConqr está de visual novo! Conte para nós o que você achou.

Notas

What is a RestfulAPI?

bikram patnaik Learning Technology Inglês 1 página

What is a RestfulAPI?

Conteúdo das notas (1)

Página 1

What is a RestfulAPI?

What is a RestfulAPI?

You can see from this scenario that there are:

Roles,

Verb ( Ask, Receive ),

Result

And they all play a drama called the ”Restful API”.

- So, the Restful API is the Representation State Transfer—it’s about the architectural style.

- There’s no standard on how you build your restful API (like, if you write a drama, there should be no standard pattern, right?).

- Instead, it’s all about the action between Browser | Server, and how you communicate with the object you want.

So, RestfulAPI is this entire picture: Browser| Web Server, action by method: GET, POST, PUT, DELETE and so on, and a Browser that will react with the result to the web page.

We primarily use http to connect both Browser| Web Server. So, now let’s look at what an http request is.

What is an http request? With an http request, you can send the specific request and get the specific product you want directly, or you can send the common request and retrieve one of the products in the whole list.

You can look at it this way:Nouns: Like whole collections of books, or resources, in http, this can be a URL such as http://book.com/books/{list}.

Verbs: This is the action involving our bookshelf. So, you can get the book, remove the book… and in http, you can use GET, POST, PUT, DELETE.

Content types: The book information is the author names, editor, publishing date, and so on. So, in http, you show this information with XML, JSON.

Example:

So if I want book 1, the URL to get book 1 can be

http: //book.com/books/1.

If I want the author information, such as the publish date from book 1, the URL can be

http: //book.com/books/1?authorInfo=John&publishDate=2016.

In JSON format, it looks like this:

What is a RestfulAPI?

So, the action should return the status, right?

http has a status code to show the return status:

200: ok

404: Not Found

500: internal Server Error

Informações

Descrição
Learning Technology Notas sobre What is a RestfulAPI?, criado por bikram patnaik em 16-03-2017.
Criado por
bikram patnaik
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?