lib/ms_teams/message.rb
def send
      uri = URI.parse( @builder.url )
      http = Net::HTTP.new( uri.host, uri.port )
      http.use_ssl = true
      response = http.post( uri.path, @builder.to_h.to_json, "Content-Type": "application/json" )
      unless successful_response?( response )
        raise FailedRequest, "Unable to send message successfully. Response code `#{response.code}`"
      end
      response
    end
# POSTs a message to the url.
#   If the response is not successful it raises
#   a MsTeams::Message::FailedRequest error
# @return response [Net:HTTPResponse]
POSTs a message to the url.
If the response is not successful it raises
a MsTeams::Message::FailedRequest error
POSTs a message to the url . If the response is not successful it raises a MsTeams :: Message :: FailedRequest error
def send
      uri = URI.parse( @builder.url )
      http = Net::HTTP.new( uri.host, uri.port )
      http.use_ssl = true
      response = http.post( uri.path, @builder.to_h.to_json, "Content-Type": "application/json" )
      unless successful_response?( response )
        raise FailedRequest, "Unable to send message successfully. Response code `#{response.code}`"
      end
      response
    end
def send uri = URI . parse ( @builder . url ) http = Net :: HTTP . new ( uri . host , uri . port ) http . use_ssl = true response = http . post ( uri . path , @builder . to_h . to_json , "Content-Type" : "application/json" ) unless successful_response? ( response ) raise FailedRequest , "Unable to send message successfully. Response code `#{response.code}`" end response end
POSTs a message to the url.
POSTs a message to the url .
None
Net:HTTPResponse