Monday, January 23, 2017

Only Getting 1 Header from Response (newbie)

I just started working with GWT, and I am having trouble with the getHeaders() method of when I make an HTTP Request.  I am only able to get one header from the Response object in the callback of my Request.  The Network tab of the browser indicates that I get all the usual headers in the response (see below).  The status of the Response is 200 (OK), but I am only able to retrieve the "Content-Type" header using getHeaders() and getHeadersAsString() (see further below).  I am using GWT 2.8.0, Firefox 50.1.0, Java 1.7.0_80, Linux Ubuntu, super dev mode.  I am trying to get the information from the Set-Cookie header.  It would be great if someone could tell me what I am doing wrong.  Thanks.

John Michie

Raw Response Headers:
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Language, Expires, Last-Modified, Content-Type, X-Client-Context-Id, Pragma, Cache-Control
Content-Length: 42
Content-Type: application/json.*;charset=ISO-8859-1
Date: Mon, 23 Jan 2017 13:50:01 GMT
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=C931C9B36E6823DD59C5B0FF47773687; Path=/TimeMobileService/; HttpOnly

Information from the Response object:
getStatusCode() = 200
getStatusText() = OK
getText() = { "status_code": 200, "status_txt": "OK" }
getHeaders().length = 1
getHeadersAsString( ) = Content-Type: application/json.*;charset=ISO-8859-1

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment