Skip to content

Latest commit

 

History

History

http

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

HTTP worker for MZBench

Supports the following methods:

connect/4, set_options/3, disconnect/2, get/3, post/4, set_prefix

connect

connect("mywebserver.com", 80)

disconnect

disconnect()

get

get("/")

post

post("/", "something useful")

set_options

Set options for requests.

set_options(follow_redirect = true, max_redirect = 5)

Complete list of available options could be found at hackney documentation.

set_prefix

Set prefix for metric reporting, for example you could differ between two server stats.

set_prefix("mygroup")

Please refer to keepalive example if you need more details.

Full examples

HTTP get, HTTP post, keepalive.