Code example for HttpPost

Methods: addHeaderaddHeadergetParams

0
  private HttpPost k;
  private XmlSerializer l;
 
  public ab(URI paramURI, int paramInt, String paramString)
  { 
    this.k = new HttpPost(paramURI);
    this.k.addHeader("Content-Type", "text/xml");
    Object[] arrayOfObject = new Object[7];
    arrayOfObject[0] = Build.VERSION.RELEASE;
    arrayOfObject[1] = Build.DEVICE;
    arrayOfObject[2] = Integer.toString(paramInt);
    arrayOfObject[3] = "3.0.3";
    arrayOfObject[4] = "3.0.3";
    arrayOfObject[5] = "174757";
    arrayOfObject[6] = "Antivirus Pro";
    String str = String.format("Mozilla/5.0 (Linux; U; Android %s; en-us; %s) %s/%s (KHTML, like Gecko) Version/%s.%s/%s", arrayOfObject);
    this.k.addHeader("User-Agent", str);
    this.k.addHeader("x-auth-token", a.b(paramString + "d5544fG==*%877hT--==QQUPWeeY89904469=="));
    HttpParams localHttpParams = this.k.getParams();
    HttpProtocolParams.setUseExpectContinue(localHttpParams, false);
    HttpConnectionParams.setConnectionTimeout(localHttpParams, 10000);
    HttpConnectionParams.setSoTimeout(localHttpParams, 15000);
    this.j = new DefaultHttpClient();
    this.l = Xml.newSerializer();
Contextual code suggestions in your IDE  Get Codota for Java