| Line 63... |
Line 63... |
| 63 |
httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
|
63 |
httpclient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpclient);
|
| 64 |
httpclient.getCredentialsProvider().setCredentials(
|
64 |
httpclient.getCredentialsProvider().setCredentials(
|
| 65 |
new AuthScope("api.flipkart.net", 443),
|
65 |
new AuthScope("api.flipkart.net", 443),
|
| 66 |
new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4"));
|
66 |
new UsernamePasswordCredentials("m2z93iskuj81qiid","0c7ab6a5-98c0-4cdc-8be3-72c591e0add4"));
|
| 67 |
HttpPost httppost = new HttpPost("https://api.flipkart.net/sellers/skus/"+fksku+"/listings");
|
67 |
HttpPost httppost = new HttpPost("https://api.flipkart.net/sellers/skus/"+fksku+"/listings");
|
| 68 |
StringBuffer jsonRequest = new StringBuffer();
|
68 |
//StringBuffer jsonRequest = new StringBuffer();
|
| 69 |
JSONObject outer = new JSONObject();
|
69 |
JSONObject outer = new JSONObject();
|
| 70 |
JSONObject inner = new JSONObject();
|
70 |
JSONObject inner = new JSONObject();
|
| 71 |
outer.put("skuId",fksku);
|
71 |
outer.put("skuId",fksku);
|
| 72 |
inner.put("selling_price", new Double(price).intValue());
|
72 |
inner.put("selling_price", String.valueOf(new Double(price).intValue()));
|
| 73 |
outer.put("attributeValues", inner);
|
73 |
outer.put("attributeValues", inner);
|
| 74 |
/*jsonRequest.append("{\"skuId\":"+"\""+fksku+
|
74 |
/*jsonRequest.append("{\"skuId\":"+"\""+fksku+
|
| 75 |
"\","+"\"attributeValues\""+":"+
|
75 |
"\","+"\"attributeValues\""+":"+
|
| 76 |
"{\"selling_price\""+":"+"\""+price+
|
76 |
"{\"selling_price\""+":"+"\""+price+
|
| 77 |
"\"}");*/
|
77 |
"\"}");*/
|