Skip to content

Consider returning location of a created resource along with status 201 #2145

@npalaska

Description

@npalaska

I continually debate how completely we should try to follow REST conventions; most of the rules are fairly loose.

However, while I'd noticed before that you were using 201 here, for some reason this change just made me think about it more carefully. It's normally strongly recommended that a 201 return a Location response header giving the URI the client can use to retrieve the new resource ... in this case the user. Some recommend returning the resource as payload (as if they'd done a GET already), or a human-readable HTML description.

Maybe not something we need to worry about right here, but maybe we should consider using Location somewhere along here for resources we create?

Originally posted by @dbutenhof in #2144 (comment)

Metadata

Metadata

Assignees

Labels

APIOf and relating to application programming interfaces to services and functionsServer

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions