You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`url`| Required | The URL to which the API request will be sent. |
69
+
|`header`| Optional | Headers to be included in the API request. |
70
+
|`data`| Optional | The payload to be sent with the API request |
71
+
|`statuscode`| Optional | The expected status code for the API response. If a different response code is received, the CLI tool will return an error and not proceed with parsing the response. |
72
+
|`output`| Optional | Specifies how the JSON response should be parsed, e.g., "translations[0].text". If omitted, the entire JSON response will be written to stdout without parsing. |
73
+
|`env`| Optional | Searches for environment variables in other YAML attributes and replaces them with the corresponding values using this pattern: ${API_KEY}. |
74
+
75
+
76
+
This structure allows you to easily define and customize your API requests within the YAML configuration file.
77
+
78
+
## CLI Flags
79
+
80
+
`httpcli` supports various flags to customize its behavior and provide additional functionality. These flags can be passed along with the command to modify the tool's behavior:
81
+
82
+
-`--config string`: Specify a custom configuration file. By default, the tool uses the `$HOME/.httpcli.yaml` file. You can provide a different file path using this flag (e.g., `httpcli --config=./my-config.yaml`).
83
+
-`--debug`: Enable debug mode to display more detailed error messages and logs for troubleshooting purposes.
84
+
-`-h, --help`: Display help information for the `httpcli` command, including a list of available flags and usage instructions.
85
+
86
+
Use these flags in combination with your API request commands to customize the behavior of `httpcli` according to your needs.
87
+
62
88
## Work in Progress
63
89
Please note that httpcli is a work in progress tool and may contain errors or incomplete features.
64
90
However, suggestions and merge requests are always welcome to help improve the tool.
0 commit comments