4,445 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Replied to REST Purity - 200 OK Vs 201 Created
So I think I have answered my own question:
The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI.
The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a database.
The action performed by the POST method might not result in a resource that can be identified by a URI.
In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on whether or not the response includes an entity that describes the result.
Generally – not necessarily – POST APIs are used to create a new resource on server.
Started a new Conversation REST Purity - 200 OK Vs 201 Created
We have a web app (SPA) where on one of the pages, the user can edit and submit a list of items (stock codes, quantities).
This is done using a Grid component, like Google Sheets, and works great.
As the user types, we do GET requests to populate additional columns with information such as price calculations, descriptions, etc, etc.
The user can then set a
name for the list, then POST the whole thing as JSON.
However, the user can also upload a CSV or XLS with the codes and quantities.
We have it set up so as soon as the user selects a file it uploads transparently in the background, and the the list is populated with the result. This works very similarly to how it works when typing.
However, the developer in charge of this feature wants to change the implementation and says we must submit the name and file without any background upload, then and then redirect to the edit/:id version of the URL to see the results and continue.
Apparently, the way we are doing it now is not proper REST (he says it doesn't create a resource and so he won't return the converted results) and he is refusing to back down on the matter – even though the users love it.
This results in a poor UX for the user because if they want to use a file, they HAVE to fill out the whole form, create a resource, and redirect.
Bear in mind, this is an SPA so we don't have the same constraints as a regular HTML form on the front end.
What's the deal here?
Surely returning a 200 with the results of the POST to a related endpoint would be OK?
If not, is there some way we can do this that will not offend his "pure" sensibilities?
Would appreciate some impartial input, thanks.