Esempio n. 1
0
 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;
 }
Esempio n. 2
0
    {
        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;
    }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
 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;
     }
 }
Esempio n. 7
0
 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;
 }