Guest User

Untitled

a guest
Dec 14th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.55 KB | None | 0 0
  1. curl -X POST https://mydomain.com/attachments -H 'authorization: Got this’ -F  "[email protected]"
  2. ----------------------------------------------------------------------------------------------------------------
  3.    uri = URI.parse("https://mydomain.com/attachments")
  4.    request = Net::HTTP::Post.new(uri)
  5.    req_headers
  6.    request["Authorization"] = req_headers
  7.    req_options = {
  8.      use_ssl: uri.scheme == "https",
  9.    }
  10.    response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  11.      http.request(request)
  12.    end
  13.    byebug
Advertisement
Add Comment
Please, Sign In to add comment