Search code examples
phpjsonpostmanphp-curl

getting an 500 error while passing the json. (PHP curl /Postman)


Sample json body:-

{
 "worknotes": "<div>In this case, Employee to visit&nbsp;<a title="https://test.test.com/#/home" href="https://test.test.com/#/home" rel="noreferrer noopener" target="_blank">https://travel.test.com/#/home</a>&nbsp;,&nbsp;click on help and log a case for support.<br /></div>"

}

Passing the content-type as application/json

receiving the 500 internal server error . Any idea how I can parse this


Solution

  • Your JSON Is Invalid

    Try this

    {
     "worknotes": "<div>In this case, Employee to visit&nbsp;<a title=\"https://test.test.com/#/home\" href=\"https://test.test.com/#/home\" rel=\"noreferrer noopener\" target=\"_blank\">https://travel.test.com/#/home</a>&nbsp;,&nbsp;click on help and log a case for support.<br /></div>"
    
    }