Created
February 9, 2021 07:49
-
-
Save freekmurze/be0512c3d54efba71782f1d6d31b8278 to your computer and use it in GitHub Desktop.
Ruby Ray
This file contains 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
uri = URI('http://localhost:23517') | |
req = Net::HTTP::Post.new(uri, {'Content-Type' => 'application/json'}) | |
req.body = { | |
uuid: SecureRandom.uuid, | |
payloads: [ | |
{ | |
type:'log', | |
content: { | |
values: [ | |
'hey' | |
], | |
}, | |
origin: { | |
file: "the file", | |
line_number: "123" | |
}, | |
}, | |
], | |
meta: {}, | |
}.to_json | |
res = Net::HTTP.start(uri.hostname, uri.port) do |http| | |
http.request(req) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment