[英]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.