Re: WOResponse 200 OK
Re: WOResponse 200 OK
- Subject: Re: WOResponse 200 OK
- From: Pascal Robert <email@hidden>
- Date: Fri, 19 Sep 2014 03:10:47 -0500 (CDT)
- Thread-topic: WOResponse 200 OK
Why aren't you using WOResponse instead of your custom class?
Envoyé de mon iPhone
> Le 2014-09-19 à 03:12, Pierre Gilquin <email@hidden> a écrit :
>
> Hi WO people,
>
>
> I try to send a 200 OK response with this code from WOPaypal framework
>
>
> private static class HTTPStatusResponse extends WOResponse {
> public static void setResponse( WOResponse response, int statusInt, String statusString ) {
> String contentString = "HTTP/1.0 "+statusInt+" "+statusString;
> response.appendContentString( contentString );
> response.setHeader( ""+contentString.length(), "content-length" );
> response.setHeader( "text/html", "content-type" );
> response.setStatus( statusInt );
> }
> public HTTPStatusResponse( int statusInt, String statusString ) {
> super();
> HTTPStatusResponse.setResponse( this, statusInt, statusString );
> }
> }
>
> private static class OKResponse extends HTTPStatusResponse {
> public OKResponse() {
> super( 200, "OK" );
> }
> }
>
> This code works for paypal but I try to use it with Google Wallet but it's not working.
>
> The answer is
> HTTP/1.1 200 Apple
> instead of OK !
>
> Can that be the problem and how can I change that ?
>
>
> Thanks in advance
>
>
> Pierre
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden