Accessing data sent via multipart formdata

Hello

I am passing a form with 4 fields along with multiple file attachments. The content type is set to multipart-form data. I can access the files with $_FILES. However I am unable to access the form data

------WebKitFormBoundaryl6UW1eBfQyYH1rbj
Content-Disposition: form-data; name=“serviceid”

1
------WebKitFormBoundaryl6UW1eBfQyYH1rbj
Content-Disposition: form-data; name=“issues”

[{“issueid”:1,“issue”:“Mails not going through”,“supportContent”:[{“contentid”:1},{“contentid”:2}]},{“issueid”:2,“issue”:“Mails not coming in”,“checked”:true}]
------WebKitFormBoundaryl6UW1eBfQyYH1rbj
Content-Disposition: form-data; name=“details”

Test
------WebKitFormBoundaryl6UW1eBfQyYH1rbj–

this may help you
$app->post(’/transcational’, function($request, $response, $args){
$api_key = $request->getParam(‘api_key’);
$msg_body = $request->getParam(‘msg_body’);
$subject = $request->getParam(‘subject’);
$receipent = $request->getParam(‘receipent’);
$data = $request->getParams();
echo $api_key.’-’.$subject.’-’$receipent.’-’.$msg_body;

//return $this->renderer->render($response, ‘api_test.php’, $data);
})->setName(‘transcational’); // added route name