I am building an API with Apigility. I am tied to a backend, where deleting a resource requires additional data, not just the resource ID taken from the URL. So I need to read a parameter fom a DELETE request's body.
While in POST request's create()
method I can simply access the $data parameter, this does not work with DELETE methods, because only $id
is provided.
Accessing $this->getEvent()->getRequest();
in my Resource classes' delete()
method, I see the request's body content (form-data) wrapped into a property called 'content' - as a string.
Can someone point me at what I am missing to access the body's key-value pairs?