Skip to content

Instantly share code, notes, and snippets.

@djberg96
Created May 5, 2021 19:12
Show Gist options
  • Select an option

  • Save djberg96/d8d91a2fe7175e5ed3ea398e73df2aac to your computer and use it in GitHub Desktop.

Select an option

Save djberg96/d8d91a2fe7175e5ed3ea398e73df2aac to your computer and use it in GitHub Desktop.
require 'awesome_print'
require 'json'
require 'excon'
url = "http://localhost:8000/api/status-board/v1/peer_dependencies"
# Update as needed
service_id1 = "b81c87a8-4528-4560-8647-c75566099b1a"
service_id2 = "9f148ae6-056d-4322-b8d4-9e885a3b35c6"
data = {
:name => "dberger",
:service_ids => [service_id1, service_id2]
}
connection = Excon.new(
url,
:headers => {
"Accept" => "application/json",
"Content-Type" => "application/json",
},
:body => data.to_json
)
response = connection.request(:method => "POST")
ap response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment