Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
4d937e3d
Commit
4d937e3d
authored
Apr 24, 2020
by
Kamron Aroonrua
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dt-http
parent
121c650a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
perform.js
plugins/dt/dt-http/perform.js
+13
-1
No files found.
plugins/dt/dt-http/perform.js
View file @
4d937e3d
...
@@ -15,6 +15,7 @@ function perform_function(context,request,response){
...
@@ -15,6 +15,7 @@ function perform_function(context,request,response){
var
req_url
=
param
.
url
||
""
;
var
req_url
=
param
.
url
||
""
;
var
req_method
=
param
.
method
||
"GET"
;
var
req_method
=
param
.
method
||
"GET"
;
var
req_headers
=
param
.
headers
||
{};
var
req_body_type
=
param
.
body_type
||
"json"
;
var
req_body_type
=
param
.
body_type
||
"json"
;
var
resp_encode
=
param
.
encoding
||
"text"
;
var
resp_encode
=
param
.
encoding
||
"text"
;
...
@@ -26,9 +27,20 @@ function perform_function(context,request,response){
...
@@ -26,9 +27,20 @@ function perform_function(context,request,response){
req_url
=
Utils
.
vm_execute_text
(
env
,
req_url
);
req_url
=
Utils
.
vm_execute_text
(
env
,
req_url
);
//parsing param from meta
if
(
typeof
meta
.
_param
==
'object'
)
{
var
_prm
=
meta
.
_param
;
req_url
=
(
_prm
.
url
)?
_prm
.
url
:
req_url
;
req_method
=
(
_prm
.
method
)?
_prm
.
method
:
req_method
;
req_headers
=
(
_prm
.
headers
)?
_prm
.
headers
:
req_headers
;
req_body_type
=
(
_prm
.
body_type
)?
_prm
.
body_type
:
req_body_type
;
resp_encode
=
(
_prm
.
encoding
)?
_prm
.
encoding
:
resp_encode
;
}
send_request
({
'url'
:
req_url
,
send_request
({
'url'
:
req_url
,
'method'
:
req_method
,
'method'
:
req_method
,
'headers'
:
param
.
headers
,
'headers'
:
req_
headers
,
'body_type'
:
req_body_type
,
'body_type'
:
req_body_type
,
'body'
:
data
,
'body'
:
data
,
'resp_encode'
:
resp_encode
},
function
(
err
,
resp
,
body
){
'resp_encode'
:
resp_encode
},
function
(
err
,
resp
,
body
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment