有人有一个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正文)