Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat
201 Created
response codes as successful requests
The Vagrant Cloud API responds to the creation of resources with `200 OK` and the create version and create provider steps only check for this status code. However according to RESTful conventions the expected response for resource creation would be `201 Created`. From MDN[1]: The HTTP 201 Created success status response code indicates that the request has succeeded and has led to the creation of a resource and restfulapi.net[2]: HTTP Status 201 indicates that as a result of HTTP POST request, one or more new resources have been successfully created on the server. To ensure that the post-processor works with alternative implementations that provide Vagrant Cloud like functionality, but adhere to RESTful conventions, it would be useful if the response code checks allowed a `200` status code. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201 [2] https://restfulapi.net/http-status-201-created/
- Loading branch information