Skip to content

Commit 072076e

Browse files
Merge pull request #11 from cleverage/10
#10 Add 201 and 204 to valid_response_code
2 parents bb858f1 + 2162805 commit 072076e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/reference/tasks/request_task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Options
4141
| `data` | `array`, `string` or `null` | | `null` | Treated as `body`, `query` or `json` on HttpClient, depending on `method` and `sends` |
4242
| `sends` | `string` | | `application/json` | `Content-Type` header, if value is not empty |
4343
| `expects` | `string` | | `application/json` | `Accept` header, if value is not empty |
44-
| `valid_response_code` | `array` | | `[200]` | One or more [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) |
44+
| `valid_response_code` | `array` | | `[200, 201, 204]` | One or more [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) |
4545
| `log_response` | `bool` | | `false` | |
4646

4747
Examples

src/Task/RequestTask.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected function configureOptions(OptionsResolver $resolver): void
137137
'data' => null,
138138
'sends' => 'application/json',
139139
'expects' => 'application/json',
140-
'valid_response_code' => [200],
140+
'valid_response_code' => [200, 201, 204],
141141
'log_response' => false,
142142
]
143143
);

0 commit comments

Comments
 (0)