Skip to content

Commit

Permalink
Add missing responseAccepted method.
Browse files Browse the repository at this point in the history
  • Loading branch information
morloderex authored Apr 27, 2018
1 parent a6b5f66 commit 3b49835
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ public function responseNoContent(
return $this->setResponseCode(204)
->respond(['message' => $message], $headers);
}

/**
* @param string $message
* @param array $headers
* @return JsonResponse
*/
public function responseAccepted(
string $message = 'The request was accepted for processing',
array $headers = []
): JsonResponse {

return $this->setResponseCode(202)
->setStatusCode(224)
->respond(['message' => $message], $headers);
}

/**
* @param array $headers
Expand Down

0 comments on commit 3b49835

Please sign in to comment.