forwardemail / forwardemail/superagent

Possible to .set header with async function

Open
#1,357 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I have some conditional headers and was wondering if it was possible to use an asynchronous way to set the header. I am trying something like -

```
...
.set(myAsyncFunction())
...

const myAsyncFunction = async => { ... }
```
This currently doesn't work - is it possible with superagent? Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.