Sure. Here's the relevant GWT restlet code that is responsible for a request
that I'm seeing the problem with:

        *ClientResource clientResource = new ClientResource(Method.GET,
url);

        //Set the Accept header
        clientResource.getClientInfo().getAcceptedMediaTypes().add(new
Preference<MediaType>(MediaType.APPLICATION_JSON));

        //Set up the callback
        clientResource.setOnResponse(new Uniform() {
            public void handle(Request request, Response response) {
                if (response.getStatus().equals(Status.SUCCESS_OK))    {
                   ...
                }
            }
        });

        //Perform the GET request
        clientResource.get();
*
I have not been able to reproduce the problem using development mode. I see
the problem when I deploy to tomcat-6.0.20. I have used both Firefox and
Chrome as a client and seen the problem with requests from both browsers.
I'll continue to look into this and try to provide you more details if I
can.

Kelly



On Wed, Mar 17, 2010 at 5:17 AM, Thierry Boileau <
[email protected]> wrote:

>  Hello Kelly,
>
> could you provide some sample code? I've just tried and it works for me
> (for example regarding the accept header):
>                 ClientResource r = new ClientResource(
> "http://localhost:8888/test"; <http://localhost:8888/test>);
>                 r.getClientInfo().getAcceptedMediaTypes().add(new
> Preference<MediaType>(MediaType.APPLICATION_ATOM));
>
>
> Best regards,
> Thierry Boileau
>
>
> I just updated from 2.0m6 to rc1 and I noticed that many of the HTTP
> headers in requests from my GWT client to the server contain what looks to
> output from calling toString on the writer objects. Here's some examples
> from my wireshark output:
>
> Accept: org.restlet.client.engine.http.header.preferencewri...@6
> Cache-Control: org.restlet.client.engine.http.header.cachedirectivewri...@3
> If-Match: org.restlet.client.engine.http.header.tagwri...@7
> If-None-Match: org.restlet.client.engine.http.header.tagwri...@8
>
>
> My code was working fine with m6 so I'm trying to determine if there are
> some code adjustments I need to make or if this is a bug. Thanks.
>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2461126

Reply via email to