mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
✨ Send request of HTTP Request node to browser console when testing
This commit is contained in:
@@ -867,6 +867,18 @@ export class HttpRequest implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
let sendRequest: any = requestOptions; // eslint-disable-line:no-any
|
||||
// Protect browser from sending large binary data
|
||||
if (Buffer.isBuffer(sendRequest.body) && sendRequest.body.length > 250000) {
|
||||
sendRequest = {
|
||||
...requestOptions,
|
||||
body: `Binary data got replaced with this text. Original was a Buffer with a size of ${requestOptions.body.length} byte.`,
|
||||
};
|
||||
}
|
||||
this.sendMessageToUI(sendRequest);
|
||||
} catch (e) {};
|
||||
|
||||
// Now that the options are all set make the actual http request
|
||||
if (oAuth1Api !== undefined) {
|
||||
requestPromises.push(this.helpers.requestOAuth1.call(this, 'oAuth1Api', requestOptions));
|
||||
|
||||
Reference in New Issue
Block a user