Skip to content

Commit

Permalink
other: Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
olexandr-mazepa committed Jan 26, 2024
1 parent fa013f1 commit 3897e59
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,29 @@ Primary accounts can make API calls on behalf of their subaccounts. [API documen
// then, if you need to reset it back to the primary account:
mg.resetSubaccount();
```

### Proxy configuration
By leveraging client configuration options, users can effortlessly establish proxy connections that align with their network requirements.
Ex:
```js
import * as FormData from 'form-data';
import Mailgun from 'mailgun.js';
const mailgun = new Mailgun(FormData);

const mg = mailgun.client({
username: 'api',
key: process.env.MAILGUN_API_KEY || 'key-yourkeyhere',
proxy: {
protocol: 'https' // 'http' ,
host: '127.0.0.1', // use your proxy host here
port: 9000, // use your proxy port here
auth: { // may be omitted if proxy doesn't require authentication
username: 'user_name', // provide username
password: 'user_password' // provide password
}
},
});
```
### Types imports
Starting from version **9.0.0.** Types can be includes as named import:
```TS
Expand Down

0 comments on commit 3897e59

Please sign in to comment.