Skip to content

Instantly share code, notes, and snippets.

@SerKnight
Last active June 5, 2020 19:52
Show Gist options
  • Save SerKnight/2a87670adc28c34f2c168fe322ebec50 to your computer and use it in GitHub Desktop.
Save SerKnight/2a87670adc28c34f2c168fe322ebec50 to your computer and use it in GitHub Desktop.
Token Migration
require 'uri'
require 'json'
require 'net/http'
uri = URI.parse(ENDPOINT)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
headers = {'Content-Type' =>'application/json', 'Authorization': authorization_header}
request = Net::HTTP::Post.new(uri.request_uri, headers)
request.body = params.to_json
response = http.request(request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment