You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other than Above You may also use following options for more control.
47
46
48
-
```sh
47
+
```
49
48
50
49
You may also set the other FAST2SMS options
51
50
method - Method for request (Default : POST)
52
51
sender_id - A custom name for SMS sender (Default: FSTSMS)
53
52
language - english / unicode (Unicode supports other languages such as Hindi) (Default: english)
54
53
route - p for promotional and t for transactional (Default: p)
55
54
flash - This field is optional, it will use "0" as default value or you can set to "1" for sending flash message.
55
+
showLogs - Default is 'true'. Recommended to not set this explicitly. Set this to false if you don't want any log message to be printed.
56
56
57
57
```
58
+
# Get Response Object
59
+
If you have explicitly defined showLogs and set it to 'false', it is highly recommended to get the response object from the server to verify the status.
60
+
61
+
To recieve the response object use then(), as shown:
62
+
63
+
```js
64
+
fast2sms.sendMessage(options).then(response=>{
65
+
console.log(response)
66
+
})
67
+
```
68
+
69
+
If you prefer async/await, it can be done by wrapping the code in an asynchronous function.
0 commit comments