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
f5a48910
Commit
f5a48910
authored
Jun 01, 2020
by
Kamron Aroonrua
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input http
parent
3b599779
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
perform.js
plugins/di/di-input/perform.js
+21
-10
No files found.
plugins/di/di-input/perform.js
View file @
f5a48910
...
...
@@ -7,14 +7,25 @@ function perform_function(context,response){
var
param
=
context
.
jobconfig
.
data_in
.
param
||
{};
var
memstore
=
context
.
task
.
memstore
;
var
input_data
=
context
.
input
.
data
;
var
input_meta
=
context
.
input
.
meta
;
var
input_meta
=
context
.
input
.
meta
||
{}
;
var
output_type
=
'object'
var
data
=
input_data
;
if
(
param
.
object
==
'httpdata'
)
{
data
=
extract_httpdata
(
input_data
);
if
(
data
.
object_type
&&
data
.
object_type
==
'httpdata'
){
var
htdata
=
data
;
input_meta
.
method
=
htdata
.
method
;
if
(
param
.
http_headers
){
input_meta
.
http_headers
=
htdata
.
http_headers
}
if
(
typeof
htdata
.
data
==
'object'
&&
htdata
.
data
.
type
==
'Buffer'
){
data
=
Buffer
.
from
(
htdata
.
data
);
}
else
{
data
=
htdata
.
data
;
}
}
}
// memstore.setItem('lasttransaction',transaction_id,function(err){
// response.success(data);
...
...
@@ -31,14 +42,14 @@ function perform_function(context,response){
}
function
extract_httpdata
(
dat
)
{
if
(
dat
.
object_type
&&
dat
.
object_type
==
'httpdata'
){
return
dat
.
data
;
}
else
{
return
dat
;
}
}
//
function extract_httpdata(dat)
//
{
//
if(dat.object_type && dat.object_type == 'httpdata'){
//
return dat.data;
//
}else{
//
return dat;
//
}
//
}
module
.
exports
=
perform_function
;
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