Created
May 5, 2021 19:12
-
-
Save djberg96/d8d91a2fe7175e5ed3ea398e73df2aac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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