set_redirect


Description:

[ Version ( since = "2.38" ) ]
public void set_redirect (uint status_code, string redirect_uri)

Sets this's status_code to status_code and adds a Location header pointing to redirect_uri.

Use this from a Server when you want to redirect the client to another URI.

redirect_uri can be a relative URI, in which case it is interpreted relative to this's current URI. In particular, if redirect_uri is just a path, it will replace the path and query of this's URI.

Parameters:

this

a Message

status_code

a 3xx status code

redirect_uri

the URI to redirect this to




2022 vala-language.org