public static HttpOperation createBasicAuthJsonPostRequest(HttpOperationClient httpoperationclient, StringBuilder stringbuilder, VineAPI vineapi, HashMap hashmap, HttpOperationReader httpoperationreader) { httpoperationclient = createPostRequest(httpoperationclient, stringbuilder, hashmap, httpoperationreader, vineapi); vineapi.addSessionKeyAuthHeader(httpoperationclient); vineapi.addContentTypeHeader(httpoperationclient, "application/json"); return httpoperationclient; }
{ httpoperationclient = createPostRequest(httpoperationclient, stringbuilder, arraylist, httpoperationreader, vineapi); vineapi.addSessionKeyAuthHeader(httpoperationclient); int j = as.length; for (int i = 0; i < j; i++) { vineapi.addContentTypeHeader(httpoperationclient, as[i]); } return httpoperationclient; }
public static HttpOperation createResourceGetRequest(HttpOperationClient httpoperationclient, StringBuilder stringbuilder, VineAPI vineapi, HttpOperationReader httpoperationreader) { httpoperationclient = new HttpOperation(httpoperationclient, new HttpGet(stringbuilder.toString()), httpoperationreader, vineapi); if (stringbuilder.toString().startsWith("https")) { vineapi.addSessionKeyAuthHeader(httpoperationclient); } return httpoperationclient; }
public static HttpOperation createMediaPutRequest(HttpOperationClient httpoperationclient, StringBuilder stringbuilder, HttpOperationReader httpoperationreader, HttpEntity httpentity, VineAPI vineapi) { stringbuilder = new HttpPut(stringbuilder.toString()); if (httpentity != null) { stringbuilder.setEntity(httpentity); } httpoperationclient = new HttpOperation(httpoperationclient, stringbuilder, httpoperationreader, vineapi); vineapi.addSessionKeyAuthHeader(httpoperationclient); return httpoperationclient; }
public static HttpOperation createBasicAuthPutRequest(HttpOperationClient httpoperationclient, StringBuilder stringbuilder, VineAPI vineapi, ArrayList arraylist, HttpOperationReader httpoperationreader) { stringbuilder = new HttpPut(stringbuilder.toString()); if (arraylist != null) { try { stringbuilder.setEntity(new UrlEncodedFormEntity(arraylist, "UTF-8")); } // Misplaced declaration of an exception variable catch (ArrayList arraylist) { arraylist.printStackTrace(); } } httpoperationclient = new HttpOperation(httpoperationclient, stringbuilder, httpoperationreader, vineapi); vineapi.addSessionKeyAuthHeader(httpoperationclient); return httpoperationclient; }
public HttpOperation(HttpOperationClient httpoperationclient, HttpRequestBase httprequestbase, HttpOperationReader httpoperationreader, VineAPI vineapi) { httprequestbase.addHeader("Accept-Encoding", "gzip"); httprequestbase.addHeader("User-Agent", USER_AGENT_STRING); if (vineapi != null) { vineapi.addClientHeaders(httprequestbase); } mHttpClient = httpoperationclient.getHttpClient(); mHttpRequest = httprequestbase; if (httpoperationreader == null) { mReader = DEFAULT_READER; return; } else { mReader = httpoperationreader; return; } }
public static HttpOperation createBasicAuthDeleteRequest(HttpOperationClient httpoperationclient, StringBuilder stringbuilder, VineAPI vineapi, HttpOperationReader httpoperationreader, String s) { httpoperationclient = new HttpOperation(httpoperationclient, new HttpDelete(stringbuilder.toString()), httpoperationreader, vineapi); vineapi.addSessionKeyAuthHeader(httpoperationclient, s); return httpoperationclient; }