简体   繁体   中英

Rails 4 : How to send http request for sms API?

I am using ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux] Rails 4.2.4

i have sms integration API which needs to send http request like below

http://123.63.33.43//blank/sms/user/urlsmstemp.php?username=XXXX&pass=XXXX&senderid=XXXX&dest_mobileno=#XXXX&tempid=45902&response=Y

i need to execute it background after creating a record. Thanks in advance.

You can use RestClient for make any kind of third party API call and for background job you can use Delayed::Job

Hope this will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM