You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filename : lib/watson/remote.rb line # : 88 tag : review md5 : 88fbf45c55d9c0d76128faaf1de92dc8
# [review] - Add :data_format to use set_form_data vs json body?
# For now, use Hash or Array, this is to differentiate between
# putting post data in body vs putting it in the form
# If a POST method, :data is present, and is a Hash, fill request body with data
if opts[:method].upcase == "POST" && opts[:data] && opts[:data].is_a?(Hash)
_req.body = opts[:data].to_json
end
# If a POST method, :data is present, and is an Array, use set_form_data
if opts[:method].upcase == "POST" && opts[:data] && opts[:data].is_a?(Array)
_req.set_form_data(opts[:data][0])
end
# Make HTTP request
_resp = _http.request(_req)
The text was updated successfully, but these errors were encountered:
filename : lib/watson/remote.rb
line # : 88
tag : review
md5 : 88fbf45c55d9c0d76128faaf1de92dc8
The text was updated successfully, but these errors were encountered: