I'm trying to insert a new parameter "token" into the POST body in the
sendSubmissions method of a class that I copied from JSONServer.java. I
think the right place to attempt this is in or around line 190 of
http://code.google.com/p/opendatakit/source/browse/src/main/java/org/opendatakit/aggregate/externalservice/JsonServer.java?repo=aggregate&name=v1_0,
but I'm not sure. In this code, baStream is eventually passed as the
postBody argument to the sendRequest method. Can I add a name/value pair at
this point, or do i need to refactor this method for a
non-ByteArrayOutputStream postBody? I'm not really sure how this baStream is
affected by the lines of code it's run through before sendRequest is called,
so any enlightenment at all would be appreciated. Thanks in advance.
The JSON server code is not complete so I would not be focusing too
much on it's nuances yet. Try looking at GoogleSpreadsheets or
FusionTables.
FYI: we got the updated JSON spec we plan on implementing from one of
our partners yesterday so that piece of code will finally start to be
updated,