I really like the idea of serializing requests to a Git-friendly text format.
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
Intellij (and all the other variations) has something very similar to this called [0]HttpClient. Being able to commit and basically just read the file is very useful. You can also do validation and scripting with it too.
Second this. One of the first VSCode extensions I install and recommend for non-devs in the team as well (BAs, QAs, etc). Kind of insane how human friendly HTTP 1.1 is.
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:
We could adopt a format like: