Subversion Repositories eFlore/Applications.del

Rev

Rev 1496 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1496 aurelien 1
package org.tela_botanica.del.client.services;
2
 
2077 mathias 3
import org.tela_botanica.del.client.modeles.Utilisateur;
4
 
1496 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);
2077 mathias 11
		if(Utilisateur.getJeton() != null && ! Utilisateur.getJeton().isEmpty()) {
12
			this.setHeader("Authorization", Utilisateur.getJeton());
13
		}
1496 aurelien 14
		this.setIncludeCredentials(true);
15
	}
16
}