Commit 1543aec6 by mingyuan

response

parent 70be1a94
...@@ -41,10 +41,14 @@ module Dingtalk ...@@ -41,10 +41,14 @@ module Dingtalk
private private
def parse_response(response, parse_as) def parse_response(response, parse_as)
raise "Request get fail, response status #{response.status}" if response.status != 200 if response.status != 200
Rails.logger.debug respose.body.to_s
raise "Request get fail, response status #{response.status}"
end
content_type = response.content_type.mime_type content_type = response.content_type.mime_type
body = response.body.to_s body = response.body.to_s
Rails.logger.debug "body: #{body}"
if content_type =~ /image|audio|video/ if content_type =~ /image|audio|video/
data = Tempfile.new('tmp') data = Tempfile.new('tmp')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment