Hi Jerome,
Thanks for your reply.
For some requestions,I will extend the code,name,...,etc. of the Status.
Especially the throwable maybe is throwed by business logic,security
logic,...,etc.
The client will get all information of the Status,include the
code,name,description,throwable,uri.
I got some codes about this,and I am filling in some code to complete all
information of the Status to the restlet client.
Thank you,
David
2008/8/5, Jerome Louvel <[EMAIL PROTECTED]>:
>
> 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
>