doc(feat): add header.json to README

This commit is contained in:
Victor Westerlund 2025-09-01 15:25:09 +02:00
parent 806e465ea2
commit 3137ea3137

View file

@ -1,22 +1,39 @@
![license](https://licensebuttons.net/p/zero/1.0/88x31.png)
# A simple curl wrapper written in bash that can be used to make HTTP requests to API endpoints.
# Simple curl bash wrapper
![screenshot](https://href.vlw.se/0194ea19-faa6-77b5-8fe1-b1459a12ea84)
<img src="https://blob.vlw.se/01/0199056d-d6fc-748b-adbb-269c8c5237ab.png">
I use this script with windows set up like this in code-server.
---
**This is a very simple wrapper for curl that I use with VSCode (code-server) to make HTTP requests - like Postman but super simple.**
VSCode is not required to run this script, I use it as a GUI.
# Files
This script uses separate files for various request options. Create these files in the same directory as `curl.sh`.
## `params.txt`
URL search parameters.
URL search parameters. (Leading "?" is optional)
```
foo=bar&hello=world
```
## `paylaod.json`
## `payload.json`
JSON request body that will be sent with all requests (except `GET`).
```json
{
"request_body_parameter": "request_body_value"
}
```
## `key.txt`
[HTTP Authentication Bearer Token](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication)
## `headers.json`
Key-value JSON object of optional request headers.
```json
{
"X-Header-Name": "Header value"
}
```
## `disable_peer_validation`
Optional empty file that when present will disable SSL peer validation - for self-signed certificates etc.