sunlightlabs / adhawk-android

Ad Hawk app for Android.
http://adhawk.sunlightfoundation.com
Other
5 stars 1 forks source link

JSON response #2

Closed boblannon closed 12 years ago

boblannon commented 12 years ago

here's the JSON response (with headers) to expect from the server. it'll always be of the form ../ad/. I'm working right now on the view associated with that location.

200 OK
Server:  nginx/1.2.1
Date:  Wed, 11 Jul 2012 19:49:13 GMT
Content-Type:  application/json
Transfer-Encoding:  chunked
Connection:  keep-alive
{"ad_profile_url": "http://adhawk.sunlight.com/ad/1"}

(fyi, since I haven't finished the ad profile view yet, right now you'll get a picture of eric wareheim)

boblannon commented 12 years ago

update... the returned JSON response now looks like this:

200 OK
Server:  nginx/1.2.1
Date:  Mon, 23 Jul 2012 15:35:40 GMT
Content-Type:  application/json
Transfer-Encoding:  chunked
Connection:  keep-alive
{"result_url": "http://adhawk.sunlightfoundation.com/ad/1c"}

I've added "c" to the end of the response in order to tell the view that this is a request coming from the mobile client, so that we can tailor design elements to the specific needs of that context.