Skip to content

Instantly share code, notes, and snippets.

@freekmurze
Created February 9, 2021 07:49
Show Gist options
  • Save freekmurze/be0512c3d54efba71782f1d6d31b8278 to your computer and use it in GitHub Desktop.
Save freekmurze/be0512c3d54efba71782f1d6d31b8278 to your computer and use it in GitHub Desktop.
Ruby Ray
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