-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Carlos Ortiz <[email protected]>
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Monica | ||
|
||
Monica is designed to handle Network requests and responses. | ||
|
||
## Features | ||
* Parse raw HTTP requests and return a Request object. | ||
* Send HTTP requests with custom headers and body. | ||
* Parse HTTP responses, including headers and body. | ||
|
||
## Usage | ||
* Runs all `mon` files in the current directory | ||
```bash | ||
monica run | ||
``` | ||
* Run a single file | ||
```bash | ||
monica run -s <file> | ||
``` | ||
|
||
## Mon file format | ||
Lines starting with `#` are considered comments and are ignored. | ||
### HTTP Request | ||
``` | ||
#Comment | ||
HTTP METHOD URL | ||
HEADERS | ||
BODY | ||
``` | ||
|
||
#### Example | ||
``` | ||
# Simple HTTP Request | ||
GET http://httpbin.org/status/200 | ||
Host: httpbin.org | ||
User-Agent: monica/0.1.0 | ||
``` | ||
|
||
``` | ||
# Simple POST HTTP Request | ||
GET http://httpbin.org/anything | ||
Host: httpbin.org | ||
User-Agent: monica/0.1.0 | ||
{ | ||
"key": "value" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Simple POST HTTP Request | ||
GET http://httpbin.org/anything | ||
Host: httpbin.org | ||
User-Agent: monica/0.1.0 | ||
|
||
{ | ||
"key": "value" | ||
} |