mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-16 14:01:06 +02:00
feat(#119): bearer auth support completed
This commit is contained in:
@ -34,6 +34,11 @@ const jsonToBru = (json) => {
|
||||
body: ${http.body}`;
|
||||
}
|
||||
|
||||
if (http.auth && http.auth.length) {
|
||||
bru += `
|
||||
auth: ${http.auth}`;
|
||||
}
|
||||
|
||||
bru += `
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ meta {
|
||||
get {
|
||||
url: https://api.textlocal.in/send
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
query {
|
||||
|
@ -7,7 +7,8 @@
|
||||
"http": {
|
||||
"method": "get",
|
||||
"url": "https://api.textlocal.in/send",
|
||||
"body": "json"
|
||||
"body": "json",
|
||||
"auth": "bearer"
|
||||
},
|
||||
"query": [
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ describe('bruToJson', () => {
|
||||
});
|
||||
|
||||
describe('jsonToBru', () => {
|
||||
it('should parse the bru file', () => {
|
||||
it('should parse the json file', () => {
|
||||
const input = require('./fixtures/request.json');
|
||||
const expected = fs.readFileSync(path.join(__dirname, 'fixtures', 'request.bru'), 'utf8');
|
||||
const output = jsonToBru(input);
|
||||
|
Reference in New Issue
Block a user