Closed fenix-hub closed 4 months ago
You can use --rand-regex-url
option. Currently, it's the only feature for dynamic requests.
It's not good for a large amount of list, but enough for a small one.
oha --rand-regex-url "http://localhost:3000/(abcde|fedage|adaedae|dawaijwd)" -m DELETE
You can use
--rand-regex-url
option. Currently, it's the only feature for dynamic requests. It's not good for a large amount of list, but enough for a small one.oha --rand-regex-url "http://localhost:3000/(abcde|fedage|adaedae|dawaijwd)" -m DELETE
Thank you @hatoo , this is more than enough! Do you know any cli utility that could help creating that regex on the fly? Like passing the list from the file to an intermediate pipeline, that replaces the list inside the regex string.
Sorry, I don't know a cli to do such a thing.
If I were you, I would like to use some shell friendly script runtime such as bun shell
.
Thank you very much for your help
Hi,
I would like to stress test an endpoint which consists of an HTTP DELETE request. The path parameter is structured like so:
DELETE /entity/{id}
where {id} is a UUIDv4 generated by my database. Since I'd like to execute multiple requests pointing to existing entities, I'd like to give a list of possible ids to
oha
in order to dinamically chose one from the sequence of given ids and execute the request, replacing the path parameter with the one from the sequence.Even giving a file like this one:
would be enough