Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bruno uses plain-text files organized in related folders, in order to declare an API client tester. #187

Open
avelino opened this issue Dec 4, 2023 Discussed in #186 · 0 comments

Comments

@avelino
Copy link
Member

avelino commented Dec 4, 2023

Discussed in #186

Originally posted by matheusfrancisco December 4, 2023
Bruno uses plain-text files organized in related folders, in order to declare an API client tester.

schema: https://bruno-docs.vercel.app/bru-language-tag-reference.html
real use case: https://github.com/usebruno/github-rest-api-collection/tree/main

The root folder needs a json file with the content as follows:

{
  "version": "1",
  "name": "<<the name of my rest api>>",
  "type": "collection"
}

every subsequent file can contain the following:

meta

info about the request

meta {
  name: Get users,
  type: http
  seq: 1
}

A method

which can be any of get, post, put, delete, options, trace, connect and head.

[get/post/put/delete/options/trace/connect/head] {
  url: https://api.github.com/users/usebruno
}

Query Params

optional

query {
  something: hello
  anotherThing: bye
  aThirdThing: hi again
}

Head Params

optional

headers {
  content-type: application/json
  Authorization: Bearer topsecret
}

Body

optional

The body can be of any type within text, xml, form-encoded, json, multipart-form, graphql, pre-request and post-request

body:text {
  This is a text body
}

cc: @J0sueTM

@avelino avelino added :enhancement New feature or request :devx :feature and removed :enhancement New feature or request labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant