ibmtjbot / node-tjbotlib

Node.js library for programming TJBot
https://ibmtjbot.github.io
Apache License 2.0
33 stars 44 forks source link

Language selection FIX of the image recognition methods #56

Closed garrapato closed 2 years ago

garrapato commented 5 years ago

The visual recognition methods require the accept_language parameter not 'Accept-Language', for example, in the v3-generated.js file segment bellow, from watson-developer-cloud library:

127             defaultOptions: extend(true, {}, this._options, {
128                 headers: extend(true, sdkHeaders, {
129                     'Accept': 'application/json',
130                     'Content-Type': 'multipart/form-data',
131                     'Accept-Language': _params.accept_language
132                 }, _params.headers),
133             }),
134         };

With this FIX, the parameter language in the config.js file will be taken correctly.

jweisz commented 2 years ago

Closing this PR as we will not be including this functionality.