-
Notifications
You must be signed in to change notification settings - Fork 184
http
Fabian Affolter edited this page Apr 27, 2014
·
3 revisions
The http
service allows GET and POST requests to an HTTP service.
Each target has four parameters:
- The HTTP method (one of
get
orpost
) - The URL, which is transformed if possible (transformation errors are ignored)
-
None
or a dict of parameters. Each individual parameter value is transformed. -
None
or a list of username/password e.g.( 'username', 'password')
[config:http]
timeout = 60
targets = {
#method #URL # query params or None # list auth
'get1' : [ "get", "http://example.org?", { 'q': '{name}', 'isod' : '{_dtiso}', 'xx': 'yy' }, ('username', 'password') ],
'post1 : [ "post", "http://example.net", { 'q': '{name}', 'isod' : '{_dtiso}', 'xx': 'yy' }, None ]
}
Note that transforms in parameters must be quoted strings:
- Wrong:
'q' : {name}
- Correct:
'q' : '{name}'