簡體   English   中英

如何從響應中獲取 cookie 並將其設置在 Rails 上 Ruby 中的下一個請求中,同時擊中第 3 方 URL

[英]How to get cookie from a response and set it on next request in Ruby on Rails while hitting 3rd party URL

我正在研究 Postman。

但現在我想打一個 URL,與 cookies 一起獲得響應並設置它,將其發送到連續的 URL。

如何在 Ruby Rails 中執行此操作?

您可以使用 Faraday ( https://github.com/lostisland/faraday ) 或 httparty ( https://github.com/jnunemaker/httparty ) 等庫來實現您想要的。 還有一個內置在 ruby 語言net/http https://ruby-doc.org/stdlib-3.1.0/libdoc/net/http/rdoc/Net/HTTP.ZFC35FDC70D5FC69D26EZ83A8的庫

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM