Example usage for com.google.gwt.http.client RequestBuilder getHeader

List of usage examples for com.google.gwt.http.client RequestBuilder getHeader

Introduction

In this page you can find the example usage for com.google.gwt.http.client RequestBuilder getHeader.

Prototype

public String getHeader(String header) 

Source Link

Document

Returns the value of a header previous set by #setHeader(String,String) , or null if no such header was set.

Usage

From source file:org.obiba.opal.web.gwt.rest.client.RequestCredentials.java

License:Open Source License

/**
 * Returns true when the credentials we currently hold have expired or are no longer valid after making a request to
 * the server. Note that if we did not provide credentials in the previous request, this method will return false.
 *
 * @param request the request that was issued to the server and to which we provided credentials.
 * @return//from w w  w.  ja  v  a 2  s.  co m
 */
public boolean hasExpired(RequestBuilder request) {
    return request.getHeader(OpalAuth.CREDENTIALS_HEADER) != null && !hasCredentials();
}