0

I have Firebug installed in Firefox. In the Net panel there are all network requests listed. When I right-click and choose Copy as cURL, how do I use this cURL?

How can I repeat my POST request data using cURL?

The copied cURL looks like this:

curl 'http://www.softwareishard.com/firebug/tips/resend/hello.php' -H 'Host: www.softwareishard.com' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:26.0) Gecko/20100101 Firefox/26.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Referer: http://www.softwareishard.com/firebug/tips/resend/resend.html' --data 'name=Bob'
2
  • 2
    What is your OS? *nix? copy/paste into your shell. Windows? You can recreate in Fiddler. Other? Just hit replay it in Firebug. Commented Feb 10, 2016 at 16:26
  • How To Bypass CORS Errors On Chrome And Firefox For Testing if CORS is issue. Otherwise CORS equivalent is traditionally built in XHR, new way appears to be fetch api. Commented Dec 7, 2016 at 0:14

1 Answer 1

0

cURL is not part of Firefox or Firebug, i.e. it cannot be executed there. As the Firebug wiki explains:

cURL is a command line tool for transferring data with URL syntax. Firebug's Copy As cURL command recreates the HTTP request (including HTTP headers and query string parameters) and copies it as a cURL command string to the clipboard. The string can be pasted into a terminal window to execute the same request or for example pasted to a client that supports cURL. In cases where the server serves compressed responses the preference extensions.firebug.net.curlAddCompressedArgument can be set to true and Firebug will add the --compressed argument to the generated command string.

It also refers to the cURL homepage.

What Firebug offers is to resend the right-clicked request via the Resend option within the context menu.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.