We are facing an issue while sending json data to an external api using CL_HTTP_CLIENT. The JSON data is produced using '/ui2/cl_json=>serialize( data = ls_body compress = abap_true pretty_name = /ui2/cl_json=>pretty_mode-camel_case )' .
when sending this JSON as data the the external api returns status 400 with response as { "errorCode": "INVALID_REQUEST_BODY", "message": "The request body is missing or improperly formatted. Unexpected character encountered while parsing value: \u001f. Path '', line 0, position 0." } .
we also stringyfied this JSON Data in backend as it might be due to parsing error but it didnt work. The same stringyfied data tried to send through browser console using ajax and it did worked without any issue.
could any any one tell us how to handle this json object and send this to external api using CL_HTTP_CLIENT. Note : JSON STRING is deeply nested .
Thanks in advance..