{"action":"closed","issue":{"url":"https://api.github.com/repos/signalpoint/DrupalGap/issues/1012","repository_url":"https://api.github.com/repos/signalpoint/DrupalGap","labels_url":"https://api.github.com/repos/signalpoint/DrupalGap/issues/1012/labels{/name}","comments_url":"https://api.github.com/repos/signalpoint/DrupalGap/issues/1012/comments","events_url":"https://api.github.com/repos/signalpoint/DrupalGap/issues/1012/events","html_url":"https://github.com/signalpoint/DrupalGap/issues/1012","id":294375637,"number":1012,"title":"Invalid json data on services.call","user":{"login":"jsbriantes","id":3175716,"avatar_url":"https://avatars2.githubusercontent.com/u/3175716?v=4","gravatar_id":"","url":"https://api.github.com/users/jsbriantes","html_url":"https://github.com/jsbriantes","followers_url":"https://api.github.com/users/jsbriantes/followers","following_url":"https://api.github.com/users/jsbriantes/following{/other_user}","gists_url":"https://api.github.com/users/jsbriantes/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbriantes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbriantes/subscriptions","organizations_url":"https://api.github.com/users/jsbriantes/orgs","repos_url":"https://api.github.com/users/jsbriantes/repos","events_url":"https://api.github.com/users/jsbriantes/events{/privacy}","received_events_url":"https://api.github.com/users/jsbriantes/received_events","type":"User","site_admin":false},"labels":[{"id":241573938,"url":"https://api.github.com/repos/signalpoint/DrupalGap/labels/7.x-1.x","name":"7.x-1.x","color":"5319e7","default":false},{"id":29642058,"url":"https://api.github.com/repos/signalpoint/DrupalGap/labels/Support%20Request","name":"Support Request","color":"e102d8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-05T12:27:12Z","updated_at":"2018-02-06T07:55:56Z","closed_at":"2018-02-06T07:55:56Z","author_association":"NONE","body":"Hi. Following the latest suggestion on #831, I have installed Services Contact module and I create my own form to send contact messages. This is my submit function:\r\n\r\n```\r\nfunction mymodule_mycontact_form_submit(form, form_state) {\r\n  try {     \r\n    var myformdata = {\r\n        name: form_state.values['name'],\r\n        mail: form_state.values['email'],\r\n        subject: form_state.values['subject'],\r\n        message: form_state.values['message'],\r\n        cid: 1\r\n    };   \r\n      \r\n    Drupal.services.call({\r\n        method: 'POST',\r\n        path: 'contact/site',\r\n        data: myformdata,\r\n        contentType: 'application/json',\r\n        success: function(result) {\r\n          console.log(result);\r\n          var msg = 'Your message has been sent.';\r\n          drupalgap_alert(msg);\r\n        },\r\n        error: function(result) {\r\n            console.log(result);\r\n            var msg = 'Error sending your message';\r\n            drupalgap_alert(msg);\r\n        }\r\n    });\r\n  }\r\n  catch (error) { console.log('mymodule_mycontact_form_submit - ' + error); }\r\n}\r\n```\r\nThe problem is I always get **POST erro - 400 - : Invalid JSON**. I tried the same json with Chrome Rest Client and It works good. I don't know why I get this error. Is there a mistake on the array or the options?\r\n\r\n"}}
{"actor":{"display_login":"jsbriantes"}}