call to `rest_access_with_body` wont accept any format of the :body [ WatsonAPIClient::Discovery ]
Opened this issue · 1 comments
aldeano19 commented
While calling WatsonAPIClient::Discovery.updateEnvironment
always get 415 Unsupported Media Type
for any format of :body
swagger reference: on https://watson-api-explorer.ng.bluemix.net/listings/discovery-v1.json search for operationId: "updateEnvironment"
Code
service = WatsonAPIClient::Discovery.new(
:user=>"#{username}",
:password=>"#{password}",
:verify_ssl=>OpenSSL::SSL::VERIFY_NONE)
service.updateEnvironment(
environment_id: "#{env_id}",
version: "2018-03-05",
body: p
)
This might be a problem with RestClient itself since I tried hard coding the :payload
on the put(payload, additional_headers={}, &block)
method. It wouldn't accept these: Object
, Hash
, String
, Json String
, always returning 415 Unsupported Media Type
.
watson-api-client (0.0.8)
rest-client (2.0.2)