angular 4 http删除方法不接受请求体

时间:2018-06-04 11:43:26

标签: angular4-httpclient

我有一个删除请求,它将正文作为请求的一部分发送,如

import {RequestOptions, Request, RequestMethod} from '@angular/http';

    let headers = new Headers({ 'Content-Type': 'application/json' });
    this.http.delete('/api/deleteAddress', new RequestOptions({
       headers: headers,
       body: [{"folder":true}]
    }));

0 个答案:

没有答案