Skip to content

Commit

Permalink
fix: spawning of retrievals w/ headers
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Oct 31, 2023
1 parent 53f5ab8 commit d835b6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/retrievals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export class Class {
this.method = method
this.headers = []
if (specs?.headers) {
Object.entries(specs.headers).forEach(entry => this.headers?.push(entry))
if (specs.headers instanceof Map) {
specs.headers.forEach((value: string, key: string) => this.headers?.push([key, value]))
} else {
Object.entries(specs.headers).forEach((entry: any) => this.headers?.push(entry))
}
}
this.body = specs?.body
this.script = specs?.script
Expand Down

0 comments on commit d835b6f

Please sign in to comment.