{
    "content": [
        {
            "type": "text",
            "text": "# curl (pydoc)\n\n## TLDR\n\n> Transfers data from or to a server.\n\n- Make an HTTP GET request and dump the contents in `stdout`:\n  `curl {{https://example.com}}`\n- Make an HTTP GET request, follow any `3xx` redirects, and dump the reply headers and contents to `stdout`:\n  `curl {{-L|--location}} {{-D|--dump-header}} - {{https://example.com}}`\n- Download a file, saving the output under the filename indicated by the URL:\n  `curl {{-O|--remote-name}} {{https://example.com/filename.zip}}`\n- Send form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`:\n  `curl {{-X|--request}} POST {{-d|--data}} '{{name=bob}}' {{http://example.com/form}}`\n- Send a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates:\n  `curl {{-k|--insecure}} {{-x|--proxy}} {{http://127.0.0.1:8080}} {{-H|--header}} '{{Authorization: Bearer token}}' {{-X|--request}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}`\n- Send data in JSON format, specifying the appropriate Content-Type header:\n  `curl {{-d|--data}} '{{{\"name\":\"bob\"}}}' {{-H|--header}} '{{Content-Type: application/json}}' {{http://example.com/users/1234}}`\n- Pass client certificate and private key for the request, skipping certificate validation:\n  `curl {{-E|--cert}} {{client.pem}} --key {{key.pem}} {{-k|--insecure}} {{https://example.com}}`\n- Resolve a hostname to a custom IP address, with verbose output (similar to editing the `/etc/hosts` file for custom DNS resolution):\n  `curl {{-v|--verbose}} --resolve {{example.com}}:{{80}}:{{127.0.0.1}} {{http://example.com}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** curl - A high-level interface to the pycurl extension\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **PACKAGE CONTENTS** (1 lines)\n- **CLASSES** (3 lines) — 1 subsections\n  - class Curl (59 lines)\n- **DATA** (4 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\ncurl - A high-level interface to the pycurl extension\n\n### PACKAGE CONTENTS\n\n### CLASSES\n\nbuiltins.object\nCurl\n\n#### class Curl\n\n|  Curl(baseurl='', fakeheaders=None)\n|\n|  High-level interface to pycurl functions.\n|\n|  Methods defined here:\n|\n|  del(self)\n|\n|  init(self, baseurl='', fakeheaders=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  answered(self, check)\n|      Did a given check string occur in the last payload?\n|\n|  body(self)\n|      Return the body from the last response.\n|\n|  close(self)\n|      Close a session, freeing resources.\n|\n|  get(self, url='', params=None)\n|      Ship a GET request for a specified URL, capture the response.\n|\n|  getinfo(self, *args)\n|      Get information about retrieval.\n|\n|  head(self, url='', params=None)\n|      Ship a HEAD request for a specified URL, capture the response.\n|\n|  header(self)\n|      Return the header from the last response.\n|\n|  info(self)\n|      Return a dictionary with all info on the last response.\n|\n|  post(self, cgi, params)\n|      Ship a POST request to a specified CGI, capture the response.\n|\n|  setoption(self, *args)\n|      Set an option on the retrieval.\n|\n|  settimeout(self, timeout)\n|      Set timeout for a retrieving an object\n|\n|  seturl(self, url)\n|      Set the base URL to be retrieved.\n|\n|  setverbosity(self, level)\n|      Set verbosity to 1 to see transactions.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n### DATA\n\nSIGPIPE = <Signals.SIGPIPE: 13>\nSIGIGN = <Handlers.SIGIGN: 1>\npy3 = True\n\n### FILE\n\n/usr/lib/python3/dist-packages/curl/init.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "curl",
        "section": "",
        "mode": "pydoc",
        "summary": "curl - A high-level interface to the pycurl extension",
        "synopsis": null,
        "tldr_summary": "Transfers data from or to a server.",
        "tldr_examples": [
            {
                "description": "Make an HTTP GET request and dump the contents in `stdout`",
                "command": "curl {{https://example.com}}"
            },
            {
                "description": "Make an HTTP GET request, follow any `3xx` redirects, and dump the reply headers and contents to `stdout`",
                "command": "curl {{-L|--location}} {{-D|--dump-header}} - {{https://example.com}}"
            },
            {
                "description": "Download a file, saving the output under the filename indicated by the URL",
                "command": "curl {{-O|--remote-name}} {{https://example.com/filename.zip}}"
            },
            {
                "description": "Send form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`",
                "command": "curl {{-X|--request}} POST {{-d|--data}} '{{name=bob}}' {{http://example.com/form}}"
            },
            {
                "description": "Send a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates",
                "command": "curl {{-k|--insecure}} {{-x|--proxy}} {{http://127.0.0.1:8080}} {{-H|--header}} '{{Authorization: Bearer token}}' {{-X|--request}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}"
            },
            {
                "description": "Send data in JSON format, specifying the appropriate Content-Type header",
                "command": "curl {{-d|--data}} '{{{\"name\":\"bob\"}}}' {{-H|--header}} '{{Content-Type: application/json}}' {{http://example.com/users/1234}}"
            },
            {
                "description": "Pass client certificate and private key for the request, skipping certificate validation",
                "command": "curl {{-E|--cert}} {{client.pem}} --key {{key.pem}} {{-k|--insecure}} {{https://example.com}}"
            },
            {
                "description": "Resolve a hostname to a custom IP address, with verbose output (similar to editing the `/etc/hosts` file for custom DNS resolution)",
                "command": "curl {{-v|--verbose}} --resolve {{example.com}}:{{80}}:{{127.0.0.1}} {{http://example.com}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "PACKAGE CONTENTS",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 3,
                "subsections": [
                    {
                        "name": "class Curl",
                        "lines": 59
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}