The server may set this optional response header to change the HTTP method after a fragment update.
Without this header Unpoly will use the requested method.
Without an X-Up-Method
header, Unpoly will assume a GET
method after a redirect.
This assumption is correct for redirects with status codes 301, 302 and 303, and incorrect for the less common codes 307 and 308.
Also for technical reason Unpoly cannot detect redirects to the same URL, but using a different method. For example, when a request
to POST /users
redirects to GET /users
.
You can address both edge cases by including an X-Up-Method
header in your responses.
X-Up-Location: /users
X-Up-Method: GET