diff --git a/index.d.ts b/index.d.ts index 403fd1a..0ebd3f0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -110,8 +110,8 @@ export interface AxiosInstance { }; request(config: AxiosRequestConfig): AxiosPromise; get(url: string, config?: AxiosRequestConfig): AxiosPromise; - delete(url: string, config?: AxiosRequestConfig): AxiosPromise; - head(url: string, config?: AxiosRequestConfig): AxiosPromise; + delete(url: string, config?: AxiosRequestConfig): AxiosPromise; + head(url: string, config?: AxiosRequestConfig): AxiosPromise; post(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise; put(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise; patch(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise; diff --git a/test/typescript/axios.ts b/test/typescript/axios.ts index 5afadd9..eb6e3fe 100644 --- a/test/typescript/axios.ts +++ b/test/typescript/axios.ts @@ -120,6 +120,14 @@ axios.get('/user', { params: { id: 12345 } }) .then(handleUserResponse) .catch(handleError); +axios.head('/user') + .then(handleResponse) + .catch(handleError); + +axios.delete('/user') + .then(handleResponse) + .catch(handleError); + axios.post('/user', { foo: 'bar' }) .then(handleUserResponse) .catch(handleError);