nfsmw010 / android-query

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

Patch for /trunk/src/com/androidquery/callback/AbstractAjaxCallback.java #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Lets you post a raw body of XML/JSON to a server. If you have a better way of 
doing this that would be great, but this works nicely for me.

Original issue reported on code.google.com by chris.mark.jenkins@gmail.com on 21 Dec 2011 at 11:36

Attachments:

GoogleCodeExporter commented 9 years ago
I'll add to the Wiki if/when you add it to the lib :)

Original comment by chris.mark.jenkins@gmail.com on 21 Dec 2011 at 11:37

GoogleCodeExporter commented 9 years ago
Hi Chris,

First of all, thanks for your input. :)

Can you point me to the service that consume the raw data instead of name value 
pair?
I want to understand and test this method before adding to the code.

Thanks.

Original comment by tinyeeliu@gmail.com on 23 Dec 2011 at 12:29

GoogleCodeExporter commented 9 years ago
Sorry for the slow reply.

The POSTing of raw content is a very SOAP style operation, generally it would 
be XML, but JSON more these days, I can't open any of the servers I am working 
on.

The idea is your sending JSON/XML objects backwards and forwards between the 
server and your device.

I just use multiple webservices some you post data pairs some url constructs.. 
some posting raw json.

For example we post:
url: http://webaddress/AuthAccount
..
{
 "username":"myname",
 "password":"password",
 "app":"someidhere",
 "etc":"etc..."
}

which would return:
{
 "status":1,
 "message":"success",
 "token":"sdsfef32f3fes"
]

Its essentially a JSON SOAP interface, really a REST + JSON is better, but I 
use lots of different interfaces so making AQuery felexible can't hurt?

Cheers,
Chris

Original comment by chris.mark.jenkins@gmail.com on 28 Dec 2011 at 2:16

GoogleCodeExporter commented 9 years ago
Added way to use a custom HttpEntity:

http://code.google.com/p/android-query/wiki/AsyncAPI#Http_POST_(Custom_Entity)

Original comment by tinyeeliu@gmail.com on 3 Jan 2012 at 3:27

GoogleCodeExporter commented 9 years ago
Saw it. Lovely thanks!

Original comment by chris.mark.jenkins@gmail.com on 3 Jan 2012 at 3:36