Skip to content

Commit

Permalink
Merge pull request #17 from WillianAgostini/feat/bun-support
Browse files Browse the repository at this point in the history
feat: Add compatibility with bun
  • Loading branch information
WillianAgostini committed Sep 19, 2023
2 parents e67830b + e6046c3 commit 2081a35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nordus",
"version": "0.0.8",
"version": "0.0.9",
"description": "Promise based HTTP client for the node.js using Fetch",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
13 changes: 8 additions & 5 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@ export class NordusRequest {
try {
const urlRequest = this.generateURL(url, nordusConfigApi);
const body = this.getBody(nordusConfigApi);
const properties: any = {
method: nordusConfigApi?.method,
body: body,
};
if (abort.signal) {
properties.signal = abort.signal;
}
const init = {
...{
method: nordusConfigApi?.method,
body: body,
signal: abort.signal,
},
...properties,
...nordusConfigApi,
};

Expand Down

0 comments on commit 2081a35

Please sign in to comment.