mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Allow msg.PATCH method on http request node
Simple fix to Close PR #524 (no CLA)
This commit is contained in:
parent
e9f0877da8
commit
f451d0644a
@ -132,7 +132,7 @@
|
||||
<ul>
|
||||
<li><code>url</code>, if set, is used as the url of the request. Must start with http: or https:</li>
|
||||
<li><code>method</code>, if set, is used as the HTTP method of the request.
|
||||
Must be one of <code>GET</code>, <code>PUT</code>, <code>POST</code> or <code>DELETE</code> (default: GET)</li>
|
||||
Must be one of <code>GET</code>, <code>PUT</code>, <code>POST</code>, <code>PATCH</code> or <code>DELETE</code> (default: GET)</li>
|
||||
<li><code>headers</code>, if set, should be an object containing field/value
|
||||
pairs to be added as request headers</li>
|
||||
<li><code>payload</code> is sent as the body of the request</li>
|
||||
|
@ -203,7 +203,7 @@ module.exports = function(RED) {
|
||||
}
|
||||
var payload = null;
|
||||
|
||||
if (msg.payload && (method == "POST" || method == "PUT") ) {
|
||||
if (msg.payload && (method == "POST" || method == "PUT" || method == "PATCH" ) ) {
|
||||
if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) {
|
||||
payload = msg.payload;
|
||||
} else if (typeof msg.payload == "number") {
|
||||
|
Loading…
Reference in New Issue
Block a user