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 &amp 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 &amp; co</partyledgername>   <basicbasepartyname>abc &amp; co</basicbasepartyname>   </envelope> 

data received server looks like:

  array  (    [data] => <envelope>   <partyledgername>abc     [amp;_co</partyledgername>  ______<basicbasepartyname>abc_] =>  [amp;_co</basicbasepartyname>  </envelope>] =>   ) 


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -