Skip to content

Commit

Permalink
remove feature: handle the request content type header
Browse files Browse the repository at this point in the history
  • Loading branch information
Gjero Krsteski committed Jan 4, 2017
1 parent 565c17e commit e22c0a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
10 changes: 0 additions & 10 deletions app/Articles/Application/Listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ public function __invoke(ReactiveRequest $request, ReactiveResponse $response)
]));
}

//handle the request content type header
if (in_array($this->request->getMethod(), ['POST', 'PUT', 'PATCH'])) {
if (in_array('Content-Type', $this->request->getHeaders())
&& $this->request->getHeaders()['Content-Type'] !== 'application/json'
) {
$this->response->writeHead(415);
return $this->response->end();
}
}

$routeTo = function ($service) {
return $service();
};
Expand Down
7 changes: 0 additions & 7 deletions tests/api/Create/ArticleWithUsupportedMediaTypeCept.php

This file was deleted.

0 comments on commit e22c0a4

Please sign in to comment.