-
Notifications
You must be signed in to change notification settings - Fork 41
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
Missing Location
header field on resource creation with a POST
#593
Labels
bug
Something isn't working
Comments
Hi! Thank you for bringing this issue to our attention. As this affects multiple CRUD-based endpoints of the Wallet API, further investigation is required to We will update this issue accordingly following our internal discussion. Thanks again! |
should be fixed with this pr : #597 |
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
It is common in RESTful CRUD services to return the resource URI of a newly created resource with a
POST
HTTP operation via theLocation
header field. Many operations (e.g. creation of a DID) return information on the new resource name in the response body as a string (even though the request has specified an accepted typeapplication/json
). However, when importing a JWK key, only an empty response body is returned, and the resource orkeyId
of the new key is completely unknown (unless akid
element was part of the JWK imported already).It is customary to use the HTTP protocol on RESTful CRUD operations by specifying the
Location
header field with the full URI to the created resource. That also eliminates the need of a HTTP body in the response. (If I'm picky, we'd expect a201 Create
response here instead of a200 OK
, but that's tolerable if the information is available).To Reproduce
Steps to reproduce the behaviour:
POST /wallet-api/wallet/{wallet}/keys/import
200 OK
responseExpected behaviour
Preferably the new resource URI in the
Location
header field of the response. Alternatively (or both) the resource URI or minimally the new key ID in the response body.Actual behaviour
Unidentifiable key ID or new key's resource URI.
Environment
curl
command line, scripted (e.g. Python) or via the Swagger UI.The text was updated successfully, but these errors were encountered: