mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-12 17:08:19 +01:00
50 lines
1001 B
Plaintext
50 lines
1001 B
Plaintext
|
meta {
|
||
|
name: get-env-var
|
||
|
type: http
|
||
|
seq: 2
|
||
|
}
|
||
|
|
||
|
get {
|
||
|
url: {{host}}/ping
|
||
|
body: none
|
||
|
auth: none
|
||
|
}
|
||
|
|
||
|
auth:awsv4 {
|
||
|
accessKeyId: a
|
||
|
secretAccessKey: b
|
||
|
sessionToken: c
|
||
|
service: d
|
||
|
region: e
|
||
|
profileName: f
|
||
|
}
|
||
|
|
||
|
tests {
|
||
|
test("should get env var in scripts", function() {
|
||
|
const host = bru.getEnvVar("host")
|
||
|
expect(host).to.equal("https://testbench-sanity.usebruno.com");
|
||
|
});
|
||
|
}
|
||
|
|
||
|
docs {
|
||
|
# API Documentation
|
||
|
|
||
|
## Introduction
|
||
|
|
||
|
Welcome to the API documentation for [Your API Name]. This document provides instructions on how to make requests to the API and covers available authentication methods.
|
||
|
|
||
|
## Authentication
|
||
|
|
||
|
Before making requests to the API, you need to authenticate your application. [Your API Name] supports the following authentication methods:
|
||
|
|
||
|
### API Key
|
||
|
|
||
|
To use API key authentication, include your API key in the request headers as follows:
|
||
|
|
||
|
```http
|
||
|
GET /api/endpoint
|
||
|
Host: api.example.com
|
||
|
Authorization: Bearer YOUR_API_KEY
|
||
|
|
||
|
}
|