What does Code 201 of a Request mean?

5

In searches I saw the 201 code of a Request means:

  

The request was met and resulted in a new feature being created.

But I did not fully understand the meaning of this.

What would be an example for a better understanding of this statement?

    
asked by anonymous 07.12.2016 / 15:51

1 answer

8

In an API Rest it is common to create new features. For example, you make a post for:

http://meudominio.com/minhaApi/meuRecurso

This creates a new feature that can be accessed at:

http://meudominio.com/minhaApi/meuRecurso/1234

Where 1234 is the id of the resource.

Many APIs make the decision to return

07.12.2016 / 16:22