comect.sidecar.processors.http module¶
-
class
comect.sidecar.processors.http.
HTTPProcessor
(url, *, method='POST', use_json=False)¶ Bases:
comect.sidecar.processors.base.Processor
A processor that takes processed lines and sends them off to some HTTP server.
This processor requires Requests to be installed. Install
comect-sidecar[http]
to also grab the version of Requests that is used to test Sidecar.Configure this processor using its parameters, as described below. Note that combining the
GET
HTTP method with theuse_json
option is unsupported and will raise a ValueError early. Any other exceptions will be raised by Requests.This is a naiive implementation, and you may want to write your own HTTP processor for anything more specialised than very basic data submission. Feel free to browse the source of this class if you’re curious just how basic it really is!