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; }
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; }
{ 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 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 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; }