I wrote a server-side programme for GOIP sending OTP number to SMS in Ruby I requested it easily, but how do I request it in elixir ?
require "uri"
require "net/http"
otp_number = rand(000000 .. 999999)
puts "Plese Enter A Phone Number: "
user_phone = gets.chomp
url = URI("http://[my-ip-address]/default/en_US/sms_info.html?line=1&action=sms&telnum=#{user_phone}&smscontent=Application your OTP is #{otp_number}&smskey=1162480578")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Basic YWRtaW46YWRtaW4="
request["Accept"] = "*/*"
request["Content-Type"] = "application/x-www-form-urlencoded"
request["Content-Length"] = "125"
response = http.request(request)
puts response.read_body