Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
themeEclipse
titleHTTP Transport Handler
linenumberstrue
input = ACCESS({source='Source',
wrapper='GenericPull',
transport='HTTP',
protocol='CSV',
dataHandler='Tuple',
options=[['uri', 'http://www.example.com'], ['method', 'get']],
schema=[
['id', 'Double'],
['data', 'String']]
})

output = SENDER({sink='Sink',
wrapper='GenericPush',
transport='HTTP',
protocol='CSV',
dataHandler='Tuple',
options=[['uri', 'http://www.example.com'], ['method', 'post']]
}, input)


/// Example for the scheduler.delay option
#PARSER PQL
#ADDQUERY
 finance2web =  ACCESS({
                  source='Google',
                  wrapper='GenericPull',
                  transport='HTTP',
                  protocol='Document',
                  datahandler='Document',
                  options=[
                    ['uri', 'http://google.de'],
                    ['scheduler.delay','1000'],
                    ['oneDocPerCall','true'],
                    ['contentType','application/json']
                  ]                                                               
                }                                                     
              ) 

...