Created
May 22, 2017 07:31
-
-
Save zengfenfei/03d7e25e3516f7118687280c6b18753b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
// Builds the url: '/account/~/extension/~/fax', and make a POST request to it | |
rc.account().extension().fax().post({ | |
to: [{ phoneNumber: "{receiverPhoneNumber}" }], | |
faxResolution: 'High' | |
}, [ // Second argument is an array of attachments, attachment can be string, Blob, node readable stream. | |
"{Message text}", | |
fs.createReadStream("{filePath}") // In node only | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment