Skip to content
This repository was archived by the owner on Nov 9, 2025. It is now read-only.

Commit cee3a0e

Browse files
committed
ruby pdsdk.send_event now returns a hash with code and body.
1 parent 3abc197 commit cee3a0e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ruby/lib/pdsdk/base.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def send_event(api_key, raw_event, opts={})
4949
headers = {
5050
"user-agent" => "pipedream-sdk:ruby/1",
5151
"content-type" => "application/json",
52+
"accept" => "application/json",
5253
"x-pd-sdk-version" => Pdsdk::VERSION,
5354
}
5455
headers["x-pd-sig"] = "sha256=#{OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), @secret_key, payload)}" if @secret_key
@@ -57,7 +58,7 @@ def send_event(api_key, raw_event, opts={})
5758
resp = http.request(req)
5859
logger.info "received response: #{resp}" # TODO remove
5960
# XXX check we get { "success": "ok" } back?
60-
resp.code.to_i
61+
{ code: resp.code.to_i, data: JSON.parse(resp.body) }
6162
end
6263

6364
def load_metadata(metadata_path, merge_data)

ruby/lib/pdsdk/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Pdsdk
2-
VERSION = "0.3.0"
2+
VERSION = "0.4.0"
33
end

0 commit comments

Comments
 (0)