Sets correct content type on web hook execution.
This commit is contained in:
parent
bc6915f24a
commit
eac366a97b
|
@ -13,7 +13,7 @@ class WebHook < ActiveRecord::Base
|
||||||
message: "should be a valid url" }
|
message: "should be a valid url" }
|
||||||
|
|
||||||
def execute(data)
|
def execute(data)
|
||||||
WebHook.post(url, body: data.to_json)
|
WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" })
|
||||||
rescue
|
rescue
|
||||||
# There was a problem calling this web hook, let's forget about it.
|
# There was a problem calling this web hook, let's forget about it.
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue