mailjet 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/mailjet/connection.rb +3 -2
- data/lib/mailjet/resource.rb +1 -0
- data/lib/mailjet/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d20c3811d37360e2c0da2176c227b7328f3e4f329fd36c1e91c723e28b3946d9
|
|
4
|
+
data.tar.gz: d13fbd83f731ddcb162ac9776af0261971bba3d0dac4887d7088c4f1b788c110
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7780c42117a2b9e6601f18a9480c0368cf33f4e7723091970dd28817affe727de3540d19c849daa56c1e3c65e0e9d8d4703e9765a73b0344cbc9263be37eae2a
|
|
7
|
+
data.tar.gz: 5aa121079dc94441e0bd876b7090ceac961a6a84c6264f73d8f65bd1242ff1182b2796d2b7dc0c2dc0b727159e10155c85c969b095df8cc101bab088a416d194
|
data/README.md
CHANGED
|
@@ -498,7 +498,7 @@ Mailjet::ContactPii.delete(contact_ID)
|
|
|
498
498
|
|
|
499
499
|
You can setup your Rack application in order to receive feedback on emails you sent (clicks, etc.)
|
|
500
500
|
|
|
501
|
-
First notify Mailjet of your desired endpoint (say: 'http://www.my_domain.com/mailjet/callback') at https://
|
|
501
|
+
First notify Mailjet of your desired endpoint (say: 'http://www.my_domain.com/mailjet/callback') at https://app.mailjet.com/account/triggers
|
|
502
502
|
|
|
503
503
|
Then configure Mailjet's Rack application to catch these callbacks.
|
|
504
504
|
|
data/lib/mailjet/connection.rb
CHANGED
|
@@ -80,13 +80,14 @@ module Mailjet
|
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
def handle_exception(e, additional_headers, payload = {})
|
|
83
|
-
|
|
83
|
+
response_content_type = e.response_headers&.[](:content_type) || ''
|
|
84
|
+
return e.response_body if response_content_type.include?("text/plain")
|
|
84
85
|
|
|
85
86
|
params = additional_headers[:params] || {}
|
|
86
87
|
formatted_payload = (additional_headers[:content_type] == :json) ? Yajl::Parser.parse(payload) : payload
|
|
87
88
|
params = params.merge!(formatted_payload) if formatted_payload.is_a?(Hash)
|
|
88
89
|
|
|
89
|
-
response_body = if
|
|
90
|
+
response_body = if response_content_type.include?("application/json")
|
|
90
91
|
e.response_body
|
|
91
92
|
else
|
|
92
93
|
"{}"
|
data/lib/mailjet/resource.rb
CHANGED
data/lib/mailjet/version.rb
CHANGED