0
I am making a REST request but while executing I have this error:
NoMethodError: undefined method `empty?' for #<URI::HTTPS:0x000000063069d8>
My code:
require 'net/http'
require 'uri'
def mandareq
url = URI("https://gateway.plusmms.net/rest/message?")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request.body = {to:[number],text:'teste',from:'Remetente'}
response = http.request(request)
puts response.read_body
end
Some solution ?