# The common status code response constant of `Ok`.
public final readonly & Ok OK = {};
But not the same for redirects such as
# The status code response record of `TemporaryRedirect`.
#
# + status - The response status code obj
public type TemporaryRedirect record {|
*CommonResponse;
readonly StatusTemporaryRedirect status = STATUS_TEMPORARY_REDIRECT_OBJ;
|};
# The status code response record of `PermanentRedirect`.
#
# + status - The response status code obj
public type PermanentRedirect record {|
*CommonResponse;
readonly StatusPermanentRedirect status = STATUS_PERMANENT_REDIRECT_OBJ;
|};
Also, when it comes to redirects location header is so common. Therefore, we can do the below,
# The status code response record of `TemporaryRedirect`.
#
# + status - The response status code obj
public type TemporaryRedirect record {|
*CommonResponse;
string location;
readonly StatusTemporaryRedirect status = STATUS_TEMPORARY_REDIRECT_OBJ;
|};
# The status code response record of `PermanentRedirect`.
#
# + status - The response status code obj
public type PermanentRedirect record {|
*CommonResponse;
string location;
readonly StatusPermanentRedirect status = STATUS_PERMANENT_REDIRECT_OBJ;
|};
The below is available for 200 OK
But not the same for redirects such as
Also, when it comes to redirects
location
header is so common. Therefore, we can do the below,