I am trying to build REST Api in laravel and my API returns a download link of file as json response. However I am stuck with an issue while accessing the api via Curl. I have used json_encode with JSON_UNESCAPED_SLASHES as well while creating a response but that did not work. The API works fine with httpie CLI but it adds escape character for forward slashes.
gaurav@debian:~$ curl -i -w "
" http://10.23.251.42:8000/api/url
"http:\/\/10.23.56.41\/abc\/xyz"
gaurav@debian:~$ http http://10.23.251.42:8000/api/url
"http://10.23.56.41/abc/xyz"
Can someone let me know if I have to provide some additional parameter to format the JSON output properly to unescape the forward slash ?