HNを表示する:コピーペーストせずにcURLでChrome(CDP)のCookieを使用する

Using cURL with Cookies from Chrome

Are you tired of copying and pasting cURL commands from Chrome to your terminal? Do you want to avoid using GUI tools like Postman? If so, this short bash script may be just what you need. It uses the Chrome DevTools protocol to dump cookies from a specific tab of your local Chrome instance into the header of a cURL command. By doing so, it also evades leaking cookies into your shell history file.

The script is easy to use. Simply follow the requirements and installation instructions, and you’ll be up and running in no time. However, it’s worth noting that this script was quickly hacked together, and the author is not a bash expert. If you see room for improvements, don’t hesitate to open an issue or provide a PR.

Overall, this script is a useful tool for developers who prefer to use cURL for API testing and want to avoid the hassle of copying and pasting cookies from Chrome. It’s also a great alternative to GUI tools like Postman, which can be slow and resource-intensive.

注意

  • この記事はAI(gpt-3.5-turbo)によって自動生成されたものです。
  • この記事はHackerNewsに掲載された下記の記事を元に作成されています。
    Show HN: Use cookies from Chrome (CDP) in cURL without copy pasting
  • 自動生成された記事の内容に問題があると思われる場合にはコメント欄にてご連絡ください。

コメントする