diff --git a/docs/http_client.md b/docs/http_client.md index 2febdba..292ab59 100644 --- a/docs/http_client.md +++ b/docs/http_client.md @@ -70,9 +70,8 @@ If error is not an http error, it is throw the error message and the error code. ## Examples ```js -// Example of a request towards `tokens-collection` endpoint passing through Microservice Gateway async function tokenGeneration(request, response) { - const crudProxy = request.getServiceProxy() + const crudProxy = request.getHttpClient('http://my-service/base-path/') const result = await crudProxy .post('/tokens-collection/', { id: request.body.quotationId, @@ -84,21 +83,6 @@ async function tokenGeneration(request, response) { } ``` -```js -// and bypassing Microservice Gateway -async function tokenGeneration(request, response) { - const crudProxy = request.getDirectServiceProxy('crud-service') - const result = await crudProxy - .post('/tokens-collection/', { - id: request.body.quotationId, - valid: true - }) - - const tokens=result.payload; - // ... -} -``` - :::note The methods below are deprecated: switch to use the `getHttpClient` method. :::