I have one json string , string is below.
{
"assigned_to":1,
"type":0,
"email":[
{
"value":"mobile@gmail.com",
"is_primary":1,
"type":1,
"type_id":1
}
],
"first_name":"Mr Mobile",
"salutation_id":1,
"links":[
{
"company":"Mobile",
"relation":"CEO & Founder",
"cmp_id":1
}
],
"phone":[
{
"code":"",
"value":"",
"is_primary":1,
"phone_type":"1",
"country_code_value":""
}
],
"photo":"",
"last_name":""
}
When i pass this data using http and post method then string is break after & sign.
My http post request code is like this.
NOTE: JSON.stringify(this.formData) returns above string
$http.post(APP.API + 'contacts', 'data=' + JSON.stringify(this.formData)).
success(function(data, status, headers, config) {
}).
error(function(data, status, headers, config) {
// debugger;
Notification.error(data.msg);
});
What is passed in this request , please find below screen shot of the network.click here
This screen shot is after remove 'data=+' remove from request: click here
data is break after & in relation key.
Please help me to solve this problem. Thanks in advance