From aa31cd63336a64b5bfb4c1098efea7a3954150c0 Mon Sep 17 00:00:00 2001 From: Florian Keller Date: Wed, 7 Aug 2019 14:00:07 +0200 Subject: [PATCH] docs: Update readme --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c16153c5..a8f1511a 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Here is a basic example: * It should not be modified by hand. */ -import {AxiosInstance} from 'axios'; +import {AxiosInstance, AxiosRequestConfig} from 'axios'; export class ExchangeService { private readonly apiClient: AxiosInstance; @@ -66,8 +66,11 @@ export class ExchangeService { } deleteExchange = async (id: number): Promise => { - const resource = `/api/v1/exchange/${id}`; - await this.apiClient.delete(resource); + const config: AxiosRequestConfig = { + method: 'delete', + url: `/api/v1/exchange/${id}`, + }; + await this.apiClient.request(config); }; } ```