basho/basho_bench — pull request #95 by drewkerrigan (2013-06-15 01:05:19+00:00)
Title: Add a generic HTTP driver

This driver ([http](https://github.com/basho/basho_bench/blob/ack-http/src/basho_bench_driver_http.erl)) allows for configuration options that make specifying arbitrary application urls easier.

Features:
* Allows setting of host, port, and path per operation
* Introduces regular expressions so that you can interpolate keys and values in more places than just at the end of a url.
* Allows for setting content type and other headers per operation

New Operation Examples:
Get
```
{{get, {"localhost", 4567, "/"}, []}, 1},
```
Get with key and headers
```
{{get_re, {"localhost", 4567, "/%%K"}, [{'Content-Type', 'application/json'}]}, 1},
```
Put with json object and value
```
{{put_re, {"localhost", 4567, "/",
"{\"this\":\"is_json_%%V\"}"}, [{'Content-Type', 'application/json'}]}, 1},
```
Post with an xml object and value
```
{{post_re, {"localhost", 4567, "/%%K",
"%%V"},
[{'Content-Type', 'application/xml'}]}, 1},
```
Delete with a key
```
{{delete_re, {"localhost", 4567, "/%%K"}, []}, 1}
```

Operations ending in `_re` use regular expressions to replace `%%K` with KeyGen() and `%%V` with ValueGen()