php - How to send the XML encoded data to the Rest API when it has & as it takes the data after "&" as new post parameter? -
i trying send xml data rest php api, xml data has "&" in - when data reaches server data after "&" taken new param. right behaviour? 1 solution send data binary octet-stream curious know if sending data application/xml & has behaviour.
server side code accept post: if (isset($_post['xmldata'])) { $data = $_post['xmldata']; } else { //see if data coming in file. $data = '' } data sent server via rest client: <envelope> <partyledgername>abc & co</partyledgername> <basicbasepartyname>abc & co</basicbasepartyname> </envelope>
data received server looks like:
array ( [data] => <envelope> <partyledgername>abc [amp;_co</partyledgername> ______<basicbasepartyname>abc_] => [amp;_co</basicbasepartyname> </envelope>] => )
Comments
Post a Comment