I have to send a DELETE request to the external cache API. How can I do that? I've been thinking about using file()
function, like:
file('https://someurl.com/api?parameter1=foo¶meter2=bar');
But first of all it doesn't recognize the type of the response, and second it throws an error:
Failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in
...And it seems to convert ampersands into &
(at least that's what xdebug shows).
How can I solve this?