tel8618217223380 / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Basic Authentication doesn't apply to multi part post request #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Hi Peter,

I have problem with Android Query when doing Ajax call (Basic Authentication) 
for a post of xml file. It seems that the request always lost its UserName and 
Password. However, It works just fine if I do an Ajax call with paramtype as 
string. Bellow is my simple codes:

        ....
        File instanceFile = new File(xmlfile.getPath());

        HashMap<String, Object> postParams = new HashMap<String, Object>();
        postParams.put("xml_submission_file", instanceFile ); // it works fine if I change to postParams.put("xml_submission_file", "<element></element>" );

        BasicHandle handle = new BasicHandle("foo", "bar");
        aq.auth(handle).ajax("http://10.0.2.2:3000/android/submission",postParams,String.class,callback);

Can you verify this whether you experience the same problem? or kindly provide 
feedback/solution/workaround? I am using the Android Query v.0.22.10

Thanks

Original issue reported on code.google.com by tinyeeliu@gmail.com on 14 Aug 2012 at 5:44

GoogleCodeExporter commented 9 years ago
Fixed in latest beta.

Original comment by tinyeeliu@gmail.com on 21 Aug 2012 at 2:48