[英]Parsing HTTPS instead of HTTP in Rails
我知道如何使用Net :: HTTP解析HTTP requrest。 您如何解析HTTPS請求?
我已經嘗試過了,它的回答是(其中一條):
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
STOX
編輯:
因此,向您展示更多細節:
例如,這是HTTP API
https://xxxxx.info/merchant/balance?password=$main_password
我如何使用Net:http來運行它? 還是我使用其他東西?
謝謝斯托克斯
如果您向我們展示了一些代碼,會有所幫助嗎?
嘗試設置這些屬性
# assuming http is generated like this http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
# might need this as well?
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.