Closed kaizirlewagen closed 3 years ago
If email is expected of the body of the request it should be provided in one of the supported formats,
application/x-www-form-urlencoded
How to parse email from text/plain
?
Sorry for my bad sample... email was only a placeholder.
My goal is to get a raw textarea for text/plain data. But if i try to send raw text to the class function the error above was shown. You can replace email with string.
Is it possible to send text/plain data to the api?
I try to get the body data with this:
// get request data directly from restler
$request_data = $this->restler->getRequestData();
if (is_null($request_data)) {
throw new RestException(404, 'Could not load any request data.');
}
// get data from array
$content = $request_data['request_data'];
I could not fix the issue through validation, so i have to use this workaround.
Using version 5.0.5.
I try to move my security token to the header and the "variables" should be in the body. It works if the "variables" are in send in JSON. But if i try to send the data with Parameter content type: text /plain the following error occurs:
With the following sample i test this:
I checked the Validator.php at line, but i don't find a solution. Any Ideas?