Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
The httpx module is an external JavaScript library that wraps around the native k6/http module.
It’s a http client with features that are not yet available in the native module.
ability to set http options globally (such as timeout)
ability to set default tags and headers that will be used for all requests
more user-friendly arguments to request functions (get, post, put take the same arguments)
httpx module integrates well with the expect library.
The source code is on GitHub.
Please request features and report bugs through GitHub issues.
Caution
This library is in active development.
This library is stable enough to be useful, but pay attention to the new versions released on jslib.k6.io.
This documentation is for the only last version only. If you discover that some of the following doesn’t work, you might be using an older version.