@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
@Override public String getRequestMethod() { return delegate.getRequestMethod(); }
@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
@Override public String getRequestMethod() { return delegate.getRequestMethod(); }
@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
@Override public String getMethodValue() { return this.connection.getRequestMethod(); }
public URLConnectionInspectorRequest( String requestId, String friendlyName, HttpURLConnection configuredRequest, @Nullable SimpleRequestEntity requestEntity, RequestBodyHelper requestBodyHelper) { super(Util.convertHeaders(configuredRequest.getRequestProperties())); mRequestId = requestId; mFriendlyName = friendlyName; mRequestEntity = requestEntity; mRequestBodyHelper = requestBodyHelper; mUrl = configuredRequest.getURL().toString(); mMethod = configuredRequest.getRequestMethod(); }
@Getter public String getRequestMethod() { return ((HttpURLConnection)getWrappedObject()).getRequestMethod(); }
private void setupFromConnection(HttpURLConnection conn, Connection.Response previousResponse) throws IOException { method = Method.valueOf(conn.getRequestMethod()); url = conn.getURL(); statusCode = conn.getResponseCode(); statusMessage = conn.getResponseMessage(); contentType = conn.getContentType(); Map<String, List<String>> resHeaders = createHeaderMap(conn); processResponseHeaders(resHeaders); // if from a redirect, map previous response cookies into this response if (previousResponse != null) { for (Map.Entry<String, String> prevCookie : previousResponse.cookies().entrySet()) { if (!hasCookie(prevCookie.getKey())) cookie(prevCookie.getKey(), prevCookie.getValue()); } } }
if (authRetryCount > 0) { String contentType = conn.getRequestProperty(CONTENT_TYPE); String requestMethod = conn.getRequestMethod(); URL url = conn.getURL(); conn = createConnection(url, requestMethod);
String requestMethod = httpUrlConnection.getRequestMethod(); RequestBody placeholderBody = HttpMethod.requiresRequestBody(requestMethod) ? Util.EMPTY_REQUEST
@Test public void testSingleGetToHttpRequest() throws Exception { GraphRequest requestMe = new GraphRequest(null, "TourEiffel"); HttpURLConnection connection = GraphRequest.toHttpConnection(requestMe); assertTrue(connection != null); assertEquals("GET", connection.getRequestMethod()); assertEquals("/" + FacebookSdk.getGraphApiVersion() + "/TourEiffel", connection.getURL().getPath()); assertTrue(connection.getRequestProperty("User-Agent").startsWith("FBAndroidSDK")); Uri uri = Uri.parse(connection.getURL().toString()); assertEquals("android", uri.getQueryParameter("sdk")); assertEquals("json", uri.getQueryParameter("format")); }
logger.appendKeyValue("Id", requests.getId()); logger.appendKeyValue("URL", url); logger.appendKeyValue("Method", connection.getRequestMethod()); logger.appendKeyValue("User-Agent", connection.getRequestProperty("User-Agent")); logger.appendKeyValue("Content-Type", connection.getRequestProperty("Content-Type"));
/** {@inheritDoc} */ @Override public String getRequestMethod() { return wrappedUrlConnection.getRequestMethod(); }
@SmallTest public void testSetVersion() throws Exception { String currentVersion = FacebookSdk.getGraphApiVersion(); FacebookSdk.setGraphApiVersion("v4.5"); GraphRequest requestMe = new GraphRequest(null, "TourEiffel"); HttpURLConnection connection = GraphRequest.toHttpConnection(requestMe); assertTrue(connection != null); assertEquals("GET", connection.getRequestMethod()); assertEquals("v4.5", FacebookSdk.getGraphApiVersion()); assertEquals("/v4.5" + "/TourEiffel", connection.getURL().getPath()); assertTrue(connection.getRequestProperty("User-Agent").startsWith("FBAndroidSDK")); Uri uri = Uri.parse(connection.getURL().toString()); assertEquals("android", uri.getQueryParameter("sdk")); assertEquals("json", uri.getQueryParameter("format")); FacebookSdk.setGraphApiVersion(currentVersion); } }
@Override protected void onFirstWrite() throws IOException { super.onFirstWrite(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Sending " + connection.getRequestMethod() + " Message with Headers to " + url + " Conduit :" + conduitName + "\n"); } } protected void setProtocolHeaders() throws IOException {