feat: bru.sendRequest api (#4867)

* feat: bru.sendRequest api

* updated the postman-translations logic to handle `pm.sendRequest` to `bru.sendRequest` translations, and added unit tests

* ~ removed `maxRedirects` and `proxy` values for sendRequest axios-instance
~ fixed the imports for the `send-request-transformer` function
~ `sendRequest` and `runRequest` will return same response object in both safe and developer mode
~ sendRequest function optimization

* revert sendRequest to async function, added a testcase for sendRequest with url string

* sendRequest callback errors handling

* updated tests and added await for the callbacks

---------

Co-authored-by: lohit <lohit@usebruno.com>
This commit is contained in:
lohit
2025-06-14 22:18:31 +05:30
committed by GitHub
parent a7ba23d97e
commit f03047a2f9
17 changed files with 1164 additions and 7 deletions

14
package-lock.json generated
View File

@@ -32748,7 +32748,8 @@
"version": "0.1.0",
"license": "MIT",
"dependencies": {
"@types/qs": "^6.9.18"
"@types/qs": "^6.9.18",
"axios": "^1.9.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.2",
@@ -32761,6 +32762,17 @@
"typescript": "^4.8.4"
}
},
"packages/bruno-requests/node_modules/axios": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
"integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"packages/bruno-schema": {
"name": "@usebruno/schema",
"version": "0.7.0",