Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20067] HTTPClient: nested JSON object corrupts payload

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionWon't Do
Resolution Date2019-11-13T21:41:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelshttpclient, json, nested, object
ReporterPatrick Reichardt
AssigneeUnknown
Created2015-09-11T08:56:06.000+0000
Updated2019-12-02T23:06:27.000+0000

Description

Comments

  1. Patrick Reichardt 2015-09-11

    no data is transferred if the nested object is present but emtpy
  2. Motiur Rahman 2015-11-23

    Hi [~patrickr] After converting nested JSON object to a string, please try to send and let us know.
       var data = {
       	"challenge" : 578,
       	"syncSource" : "weather",
       	"foo" : "bar",
       	"syncParameters" : {
       		"zoo" : "lander",
       		"sequel" : 2
       	}
       };
       
       var value = JSON.stringify(data);
       
       xhr.send(value);
       
       
    Hope this helps.
  3. Patrick Reichardt 2015-11-23

    @morahman yes, sending data as a string works - thank you for the hint!
  4. Alan Hutton 2019-11-13

    Closing. Support provided fix suggestion.

JSON Source