Code example for HttpPost

Methods: addHeader, getParams

0
  private XmlSerializer m;
 
  public j(URI paramURI, int paramInt1, int paramInt2, String paramString1, String paramString2, String paramString3)
  { 
    this.a = paramURI;
    this.l = new HttpPost(paramURI);
    this.l.addHeader("Content-Type", "text/xml");
    Object[] arrayOfObject = new Object[7];
    arrayOfObject[0] = Build.VERSION.RELEASE;
    arrayOfObject[1] = Build.DEVICE;
    arrayOfObject[2] = Integer.toString(paramInt2);
    arrayOfObject[3] = Integer.toString(paramInt1);
    arrayOfObject[4] = paramString2;
    arrayOfObject[5] = paramString3;
    arrayOfObject[6] = "Antivirus";
    String str = String.format("Mozilla/5.0 (Linux; U; Android %s; en-us; %s) Prod/%s/%s (KHTML, like Gecko) Version/%s.%s/%s", arrayOfObject);
    this.l.addHeader("User-Agent", str);
    this.l.addHeader("x-auth-token", a.c(paramString1 + "d5544fG==*%877hT--==QQUPWeeY89904469=="));
    HttpParams localHttpParams = this.l.getParams();
    HttpProtocolParams.setUseExpectContinue(localHttpParams, false);
    HttpConnectionParams.setConnectionTimeout(localHttpParams, 10000);
    HttpConnectionParams.setSoTimeout(localHttpParams, 15000);
    this.k = new DefaultHttpClient();
    this.m = Xml.newSerializer();