InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Chrome developer tools

  • Chrome - copy as cURL
  • Chrome - how to access pre-release features
  • Chrome - useful internal urls (chrome://)
  • Chrome - view javascript errors
  • Edit and debug css in Chrome
  • How to detach Chrome developer tools window
  • View http headers in Chrome
  • clear Chrome HTTP 301 redirect cache
  • custom http request headers
  • how to debug :hover
  • how to debug javascript in Chrome
  • view event handlers in Chrome
 
  • Home
  • > Tutorials
  • > Web Development
  • > Chrome developer tools

Chrome – copy any request as cURL including headers

on Jun 12, 2016

Chrome developer tools has a pretty handy feature to copy any GET/POST request in network tab to cURL. This also copies all headers involved in the request. This is very handy tool if you are debugging and want to fetch a request on command line.

Here are quick steps:

  • Open chrome developer tools in Chrome and select network tab.
  • Visit any Url (say https://www.google.co.in/)
  • Right click on any request in network tab and click on copy as cRUL. We’ll use the first request itself (www.google.co.in) for the purpose of this tutorial. But it can be any other request which is visible in network tab.
    chrome-copy-as-curl

  • Now paste the cURL anywhere you want. It should look something like this:
    curl 'https://www.google.co.in/' -H 'pragma: no-cache' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8,hi;q=0.6' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: no-cache' -H 'authority: www.google.co.in' --compressed
    

Suggested posts:

  1. Bash – how to find last command exit status code
  2. HTML form file upload hello world
  3. Alexa rank – how reliable is it?
  4. How to do recursive grep with specific file pattern
  5. Chrome extensions – how to enable developer mode
  6. view event handlers in Chrome
  7. How to use fitvids.js for automatically resizing videos
  8. WordPress – query to dump all posts with featured image
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Chrome developer tools, Tutorials, Web Development
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress