Exemplo 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;
 }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
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;
 }
Exemplo n.º 4
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;
    }
Exemplo 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;
 }
Exemplo n.º 6
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;
 }