This is meant to be returned by a function that takes a form POST submission. You
want to set the url of the new resource it created, which is set as the http
Location header for a "201 Created" result, and you can also set a separate
destination for browser users, which it sets via a "Refresh" header.
The resourceRepresentation should generally be the thing you just created, and
it will be the body of the http response when formatted through the presenter.
The exact thing is up to you - it could just return an id, or the whole object, or
perhaps a partial object.
This is meant to be returned by a function that takes a form POST submission. You want to set the url of the new resource it created, which is set as the http Location header for a "201 Created" result, and you can also set a separate destination for browser users, which it sets via a "Refresh" header.
The resourceRepresentation should generally be the thing you just created, and it will be the body of the http response when formatted through the presenter. The exact thing is up to you - it could just return an id, or the whole object, or perhaps a partial object.