Simple fix to check/force http: to close #288

Checks url starts http: or https: - if not add http: - at least then it breaks gently.
Also add resultant url to any error payload if request  fails in order to make debug easier.
This commit is contained in:
Dave C-J
2014-07-23 12:09:21 +01:00
parent 14a1899c23
commit 82036dd84a
2 changed files with 10 additions and 5 deletions

View File

@@ -121,8 +121,9 @@
<p>The URL and HTTP method can be configured in the node, but also
overridden by the incoming message:
<ul>
<li><code>url</code>, if set, is used as the url of the request</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>
<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>
<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>