扩展http请求发送JSON正文的示例?

时间:2018-07-11 23:00:57

标签: paw-app

有人有一个Paw扩展程序示例,该扩展程序将JSON正文作为HTTP POST的一部分发送吗?

类似的东西:

const http_request = new NetworkHTTPRequest();
http_request.requestUrl = endpoint + '/login';
http_request.requestMethod = 'POST';
http_request.requestTimeout = 3600000;
http_request.setRequestHeader('Content-Type', 'application/json;');
http_request.requestBody = `{"emailAddress":"${login}","password":"${hashedPassword}"}`;

(这不起作用,正在发送一个空的JSON正文)

0 个答案:

没有答案