From 3b7c044c2fec87bf83548d4137a5fbfc5f39b196 Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Mon, 20 Nov 2017 22:52:04 -0500 Subject: [PATCH] readme tweak --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 06668f4..40b2842 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,18 @@ Intellisense and compile support from typing the REST calls: npm install typed-rest-client --save ``` +## Samples + +See [samples](./samples) for complete coding examples + +Also see [rest](./test/resttests.ts) and [http](./test/httptests.ts) tests for detailed examples. + ## Errors ### http The http client does not throw unless truly exceptional. A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. -See [tests](./test/httptests.ts) for detailed examples. +See [http tests](./test/httptests.ts) for detailed examples. ### rest The rest client is a high level client which uses the http client. It's responsibility is to turn a body into a serialized typed object. @@ -39,11 +45,7 @@ A 404 will not throw but the result object will be null and the result statusCod Other 4xx and 5xx errors will throw. The status code will be attached to the error object. If a restfull error object is returned ({ message: xxx}), then the error message will be that. Otherwise, it will be a generic, "Failed Request: (xxx)". -See [tests](./test/resttests.ts) for detailed examples. - -## Samples - -See [samples](./samples) for complete coding examples +See [rest tests](./test/resttests.ts) for detailed examples. ## Contributing