You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ So a handler can:
118
118
Expected results should be of type `Promise` of [HttpResponse](#httpresponse).
119
119
120
120
Here are two samples usage:
121
-
- A handler that validate the HTTP status code: <https://github.com/Coreoz/simple-http-rest-client/tree/master/src/lib/client/FetchStatusValidators.ts>
121
+
- A handler that validate the HTTP status code: <https://github.com/Coreoz/simple-http-rest-client/tree/master/src/lib/handler/ValidateBasicStatusCodeHandler.ts>
122
122
- A handler that return a JSON results (the function is named `toJsonResponse`): <https://github.com/Coreoz/simple-http-rest-client/tree/master/src/lib/client/JsonFetchClient.ts>
123
123
124
124
### HttpPromise
@@ -167,7 +167,7 @@ The goal here is to verify that the result is excepted and correct.
167
167
By default, these validators are provided:
168
168
- **validateBasicStatusCodes**: It raises an error if the status code is 403, and it returns an empty response if the status code is 200
169
169
- **jsonContentTypeValidator**: It verifies the response content-type is JSON
170
-
- **contentTypeValidator**: It is used to create response content-type validator like `jsonContentTypeValidator`
170
+
- **validateContentType**: It is used to create response content-type validator like `jsonContentTypeValidator`
171
171
172
172
Once validators are added, our API client should look like this:
0 commit comments