by divbzero · 2y ago · 0 comments
But if we want a Git-friendly text format, why not mimic HTTP/1.1 request syntax as much as possible? Maybe with Jekyll-like YAML front matter for metadata that doesn’t fit?
So for Get Users.bru instead of the current example of:
meta {
name: Get Users
type: http
seq: 1
}
get {
url: https://reqres.in/api/users
body: none
}
headers {
Content-Type: application/json
}
We could adopt a format like: ---
name: Get Users
type: http
scheme: https
seq: 1
---
GET /api/users HTTP/1.1
Host: reqres.in
Content-Type: application/json[0]https://www.jetbrains.com/help/idea/http-client-in-product-c...
Example:
GET https://example.com/comments/1 HTTP/1.1
###
POST https://example.com/comments HTTP/1.1
content-type: application/json
{
"name": "sample",
"time": "Wed, 21 Oct 2015 18:27:50 GMT"
}