A POST request shall create the resource and return a "Location" header pointing to the created resource.
I'm using grape API with rails and asking myself what is the best way to return the created resource URI. Is grape offering a way to get a resource URI without setting it manually ?
resource :blup do
post '/' do
blup = Blup.create(first_name: 'Jamie')
if blup.present?
header 'Location', 'HERE blup URI'
end
end
end