Versions Compared

Key

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

...

  • uri: The URI
  • method: The HTTP method, one of: GET, POST, PUT, DELETE, HEAD (default: GET) (optional)
  • body: The content for POST and PUT requests when using this transport handler for a source (optional)
  • chunked: Controls the 'chunked' header (see Chunked transfer encoding). (default: true) (optional)

Example

PQL

Code Block
languagejavascript
themeEclipselanguagejavascript
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)

CQL

Code Block
languagesql
themeEclipselanguagesql
titleHTTP Transport Handler
linenumberstrue
CREATE STREAM source (id Double, data STRING)
    WRAPPER 'GenericPush'
    PROTOCOL 'CSV'
    TRANSPORT 'HTTP'
    DATAHANDLER 'Tuple'
    OPTIONS ( 'uri' 'http://www.example.com' 'method' 'get')


CREATE SINK sink (id Double, data STRING)
    WRAPPER 'GenericPush'
    PROTOCOL 'CSV'
    TRANSPORT 'HTTP'
    DATAHANDLER 'Tuple'
    OPTIONS ( 'uri' 'http://www.example.com' 'method' 'post')