Subversion Repositories eFlore/Applications.cel

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1918 aurelien 1
package org.tela_botanica.client.util;
2
 
2806 aurelien 3
import org.tela_botanica.client.modeles.objets.Utilisateur;
4
 
1918 aurelien 5
import com.google.gwt.http.client.RequestBuilder;
6
 
7
public class RequestBuilderWithCredentials extends RequestBuilder {
8
 
9
	public RequestBuilderWithCredentials(Method httpMethod, String url) {
10
		super(httpMethod, url);
2806 aurelien 11
		if(!Utilisateur.getJeton().isEmpty()) {
12
			this.setHeader("Authorization", Utilisateur.getJeton());
13
		}
1918 aurelien 14
		this.setIncludeCredentials(true);
15
	}
16
}