Hi David,
For the HTTP protocol, a status is composed of a status code (ex: "404") and
a reason phrase (ex: "Resource not found"). In Restlet, you can use standard
statuses like this:
response.setStatus(Status.CLIENT_ERROR_NOT_FOUND);
By default it will set the status code and reason phrase (named
"description" in the Restlet API) properly. You can also customize the
description like this:
response.setStatus(Status.CLIENT_ERROR_NOT_FOUND, "My own description");
Hope this helps!
Best regards,
Jerome
_____
De : ??? [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 31 juillet 2008 11:11
À : [email protected]
Objet : ServletCall (HttpCall) was not setting the name for custom error
statuses
hi,
I did a custom status at server side,but I got a null value of the
status's name at client side .
I found the codes about this in the HttpServerConverter as follow,
if (response.getStatus() != null) {
response.getHttpCall().setStatusCode(
response.getStatus().getCode() );
response.getHttpCall().setReasonPhrase(
response.getStatus().getDescription() );
}
Thanks,
David