Send a SMS message and more with the HttpBasicAuth Rest API.
Name | Type | Description | |
---|---|---|---|
username |
string
|
The basic auth username. |
|
password |
string
|
The basic auth password. |
const HttpBasicAuth = require('vendor/HttpBasicAuth.js');
let httpRequest = new HttpBasicAuth('username', 'password');
HttpBasicAuth.get('/customers');
HttpBasicAuth
Make a GET request to an external Rest API
Name | Type | Description | |
---|---|---|---|
path |
string
|
Request path |
|
options |
Options
|
Additional configuration for Oauth calls |
Optional |
object
Make a POST request to an external Rest API.
Name | Type | Description | |
---|---|---|---|
path |
string
|
Request path |
|
data |
object
|
Request payload |
|
options |
Options
|
Additional configuration for Oauth calls |
Optional |
object
Make a PUT request to an external Rest API.
Name | Type | Description | |
---|---|---|---|
path |
string
|
Request path |
|
data |
object
|
Request payload |
|
options |
Options
|
Additional configuration for Oauth calls |
Optional |
object
Make a PATCH request to an external Rest API.
Name | Type | Description | |
---|---|---|---|
path |
string
|
Request path |
|
data |
object
|
Request payload |
|
options |
Options
|
Additional configuration for Oauth calls |
Optional |
object
Make a DELETE request to an external Rest API.
Name | Type | Description | |
---|---|---|---|
path |
string
|
Request path |
|
options |
Options
|
Additional configuration for Oauth calls |
Optional |
object
Send an HTTP Basic authenticated request.
Name | Type | Description | |
---|---|---|---|
method |
object
|
The request type: GET, POST, PUT, PATCH, etc |
|
endpoint |
string
|
The HttpBasicAuth API endpoint. Ex: rate, |
|
data.from |
string
|
The phone number that the SMS will be sent from. Must be registered in HttpBasicAuth. |
|
data.body |
string
|
The SMS message text. |
|
options |
boolean
|
Optional | |
options.debug |
boolean
|
Set to true to debug the HttpBasicAuth API request. |
Optional |
boolean