Code examples for HttpRequest

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
27:	if(request.containsHeader(SOAP_Action)){ 
-
30:	if(request.getParams().getParameter(SOAP_Action)!=null){ 
31:	request.addHeader(SOAP_Action,(String) request.getParams().getParameter(SOAP_Action)); 
Full Snippet Info
6
CodeRank
196:	if (!request.containsHeader(HEADER_ACCEPT_ENCODING)) { 
197:	request.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP); 
Full Snippet Info
6
CodeRank
91:	Assert.assertEquals(HttpVersion.HTTP_1_1, request.getProtocolVersion()); 
92:	Assert.assertEquals("/", request.getRequestLine().getUri()); 
93:	Assert.assertEquals("GET", request.getRequestLine().getMethod()); 
94:	Assert.assertTrue(request.containsHeader("User-Agent")); 
Full Snippet Info
6
CodeRank
36:	request.addHeader("provider", "GoogleOpenIDConnect"); 
37:	request.addHeader("response_type", "code"); 
38:	request.addHeader("token", mToken); 
-
40:	request.addHeader("scope", "https://www.googleapis.com/auth/userinfo.email"); 
Full Snippet Info
6
CodeRank
29:	request.addHeader("X-User-Id", mLogin); 
30:	request.addHeader("X-Device-Id", mDeviceId); 
31:	request.addHeader("X-Application-Name", mAppname); 
32:	request.addHeader("X-Temporary-Authentication-Token", mToken); 
Full Snippet Info
6
CodeRank
133:	assertEquals("/whatever", request.getRequestLine().getUri()); 
134:	assertEquals(1, request.getAllHeaders().length); 
135:	assertEquals("stuff more stuff", request.getFirstHeader("Some header").getValue()); 
Full Snippet Info
5
CodeRank
88:	v("Executing OAuthProcessor : " + request.getRequestLine().getUri()); 
-
99:	consumer.sign(request); 
Full Snippet Info
5
CodeRank
54:	String uri = request.getRequestLine().getUri(); 
Full Snippet Info
5
CodeRank
130:	if (!request.containsHeader(HEADER_ACCEPT_ENCODING)) { 
131:	request.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP); 
Full Snippet Info
5
CodeRank
19:	req.addHeader("Host", "api.runkeeper.com"); 
20:	req.addHeader("Authorization", "Bearer " + ReboundmeActivity.getAccessToken()); 
21:	req.addHeader("Accept", "application/vnd.com.runkeeper.StrengthTrainingActivityFeed+json"); 
Full Snippet Info
5
CodeRank
96:	if (!request.containsHeader("Accept-Encoding")) { 
97:	request.addHeader("Accept-Encoding", "gzip"); 
Full Snippet Info
5
CodeRank
174:	Log.d(TAG, "Intercepted: " + request.getRequestLine().toString()); 
175:	mLastRequest = request; 
Full Snippet Info
5
CodeRank
91:	String uriPath = request.getRequestLine().getUri(); 
-
111:	Args.notNull(request, "HTTP request"); 
Full Snippet Info
5
CodeRank
63:	Args.notNull(request, "HTTP request"); 
-
65:	if (!request.containsHeader(HTTP.EXPECT_DIRECTIVE)) { 
-
67:	final ProtocolVersion ver = request.getRequestLine().getProtocolVersion(); 
Full Snippet Info
5
CodeRank
196:	if (!request.containsHeader(HEADER_ACCEPT_ENCODING)) { 
197:	request.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP); 
Full Snippet Info
5
CodeRank
87:	Mockito.when(this.request.getRequestLine()).thenReturn(new BasicRequestLine("GET", "/", HttpVersion.HTTP_1_0)); 
-
92:	Mockito.eq(this.request), Mockito.eq(this.response), Mockito.eq(this.context)); 
Full Snippet Info
5
CodeRank
108:	request.setHeader("Accept", "application/json"); 
109:	request.setHeader("Content-type", "application/json"); 
110:	request.setHeader("Accept-Encoding", "gzip"); 
Full Snippet Info
5
CodeRank
84:	this.log.debug(this.id + ": "  + request.getRequestLine().toString()); 
-
86:	super.submitRequest(request); 
Full Snippet Info
5
CodeRank
45:	if (!request.containsHeader("Accept-Encoding")) { 
46:	request.addHeader("Accept-Encoding", "gzip"); 
Full Snippet Info
5
CodeRank
218:	if (!request.containsHeader(HEADER_ACCEPT_ENCODING)) { 
219:	request.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP); 
Full Snippet Info
5
CodeRank