Esempio n. 1
0
 private static void b(HttpURLConnection httpurlconnection, q q1) {
   byte abyte0[] = q1.p();
   if (abyte0 != null) {
     httpurlconnection.setDoOutput(true);
     httpurlconnection.addRequestProperty("Content-Type", q1.o());
     httpurlconnection = new DataOutputStream(httpurlconnection.getOutputStream());
     httpurlconnection.write(abyte0);
     httpurlconnection.close();
   }
 }
Esempio n. 2
0
  static void a(HttpURLConnection httpurlconnection, q q1) {
    switch (q1.a()) {
      default:
        throw new IllegalStateException("Unknown method type.");

      case -1:
        byte abyte0[] = q1.l();
        if (abyte0 != null) {
          httpurlconnection.setDoOutput(true);
          httpurlconnection.setRequestMethod("POST");
          httpurlconnection.addRequestProperty("Content-Type", q1.k());
          httpurlconnection = new DataOutputStream(httpurlconnection.getOutputStream());
          httpurlconnection.write(abyte0);
          httpurlconnection.close();
        }
        return;

      case 0: // '\0'
        httpurlconnection.setRequestMethod("GET");
        return;

      case 3: // '\003'
        httpurlconnection.setRequestMethod("DELETE");
        return;

      case 1: // '\001'
        httpurlconnection.setRequestMethod("POST");
        b(httpurlconnection, q1);
        return;

      case 2: // '\002'
        httpurlconnection.setRequestMethod("PUT");
        b(httpurlconnection, q1);
        return;

      case 4: // '\004'
        httpurlconnection.setRequestMethod("HEAD");
        return;

      case 5: // '\005'
        httpurlconnection.setRequestMethod("OPTIONS");
        return;

      case 6: // '\006'
        httpurlconnection.setRequestMethod("TRACE");
        return;

      case 7: // '\007'
        httpurlconnection.setRequestMethod("PATCH");
        b(httpurlconnection, q1);
        return;
    }
  }
 protected final void a(
     HttpURLConnection paramHttpURLConnection, com.yelp.android.cw.c paramc, d<f> paramd)
     throws Exception {
   paramc = ("channelId=" + jp.line.android.sdk.c.a().d()).getBytes("UTF-8");
   paramHttpURLConnection.setRequestMethod("POST");
   paramHttpURLConnection.setDoOutput(true);
   paramHttpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
   paramHttpURLConnection.setRequestProperty("Content-Length", String.valueOf(paramc.length));
   b(paramHttpURLConnection);
   paramHttpURLConnection = paramHttpURLConnection.getOutputStream();
   paramHttpURLConnection.write(paramc);
   paramHttpURLConnection.flush();
   paramHttpURLConnection.close();
 }