Should PUT create the resource if it doesn't exist ?
See original GitHub issueStep to reproduce
- create a resource
post
indb.json
- send the following request
PUT
/post
{
"author": "someone",
"content": "this project is awesome"
}
Actual Behaviour
The request fail and returns 404
Expected Behaviour
The resource is created and 201 is returned
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Should HTTP PUT create a resource if it does not exist?
Usually, in a real REST scenario though, the client should use URI that are provided by the server and not just chose any...
Read more >When to use PUT or POST in a RESTful Web Service? Answer
Btw, you are not alone, one of the most common confusion among web developers is the choice of PUT or POST HTTP method...
Read more >REST Lazy Reference Create GET or POST?
GET should never create a resource. Not one that is visible to the user. It's a read-only operation. The standard for both POST...
Read more >PUT - HTTP - MDN Web Docs
The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
Read more >How to Use Conditional Expressions to Create a Resource if it ...
We often get support requests for advice on how to create conditional resources. That is, how do I create a resource if it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any updates for this?
this should be a bug, now is 2019