lib/http_crawler/client.rb in http_crawler-0.3.1.24 vs lib/http_crawler/client.rb in http_crawler-0.3.1.25
- old
+ new
@@ -287,12 +287,12 @@
raise "Client uri为空" unless self.uri
request {http.get(self.uri.to_s, :ssl_context => @ctx)}
end
# 发送 post 请求
- def post(path, params = {})
+ def post(path, params = {},format = :form)
raise "Client uri为空" unless self.uri
- request {http.post((self.uri + path).to_s, :form => params, :ssl_context => @ctx)}
+ request {http.post((self.uri + path).to_s, format => params, :ssl_context => @ctx)}
end
# 请求的响应
attr_accessor :response
protected :response=