Extending Requests in dothttp
The "extend" feature in dothttp allows users to inherit request authentication and headers from a parent request. This feature is especially useful for creating a hierarchy of requests where one request can use the authentication and headers defined in another ("parent") request, and potentially override them if necessary.
Extending from a Base Request#
The "extend" feature enables the following capabilities:
- Authentication Inheritance: Define authentication in one request and use it across multiple requests.
- Header Inheritance: Specify headers in one request and utilize them in other requests.
- URL Concatenation: Join the base URL and the target HTTP URL.
- Insecure Requests: Mark requests as insecure using the
@insecuretag. - Clear Requests: Use the
@cleartag to clear request attributes.
Example 1: Basic Authentication#
Example 2: Digest Authentication#
JWT Authorization#
The "extend" feature in dothttp provides a powerful and flexible way to structure and manage your HTTP requests, making it easier to reuse and customize common settings across multiple requests.