A recent change to the SMS API was sending responses with a Content-Type of text/plain unless an Accept header with a value of application/json was sent in the request. Although the change was reverted, it would be prudent to add this header to requests sent from the library.
What this PR does
Sets an Accept header with a value of application/json for all requests. This is done by an update to the Namespace#build_request method.
Reason for this PR
A recent change to the SMS API was sending responses with a
Content-Type
oftext/plain
unless anAccept
header with a value ofapplication/json
was sent in the request. Although the change was reverted, it would be prudent to add this header to requests sent from the library.What this PR does
Accept
header with a value ofapplication/json
for all requests. This is done by an update to theNamespace#build_request
method.See https://github.com/Vonage/vonage-ruby-sdk/issues/216 for additional context.