-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POST requests return incorrect response code #63
Comments
Currently running off dev-master |
Fancy a pull request? 😄 |
robbieaverill
added
type/enhancement
affects/v4
change/minor
complexity/low
impact/low
impact/medium
and removed
impact/low
labels
May 30, 2018
phptek
pushed a commit
to phptek/silverstripe-restfulserver
that referenced
this issue
May 30, 2018
…t in POST context.
@robbieaverill Done. See #64 |
phptek
pushed a commit
to phptek/silverstripe-restfulserver
that referenced
this issue
May 30, 2018
…t in POST context.
phptek
added a commit
to phptek/silverstripe-restfulserver
that referenced
this issue
Jun 5, 2018
…t in POST context. (silverstripe#64)
phptek
added a commit
to phptek/silverstripe-restfulserver
that referenced
this issue
May 17, 2019
…t in POST context. (silverstripe#64)
phptek
added a commit
to phptek/silverstripe-restfulserver
that referenced
this issue
May 17, 2019
…t in POST context. (silverstripe#64)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I issue an HTTP POST against an enabled datamodel-as-endpoint, and the resource does not exist, one is created and the module correctly scaffolds a 201 response. However, in
postHandler()
the logic attempts to address the spec for HTTP 201 responses and automatically redirect to the newly created resource at/api/v1/My-Data-Model/<ID>.json
by the addition of aLocation
header.This has at least 3 issues that I can see:
canCreate()
logic on my data-model, and not havecanView()
consulted at all, I cannot, other than to manually runremoveHeader('Location')
in my app's calling logic.My suggestion is simple; to add an opt-out YML config option to skip the addition of the
Location
header, but where the default is to maintain current behaviour.example:
The text was updated successfully, but these errors were encountered: