# Curl

By default, cURL will perform GET requests on whatever URL you supply it, such as: `curl www.google.com`

This would retrieve the main page for google with a GET request. Using command line flags for cURL, we can do a lot more than just GET content.

The **-X flag** allows us to specify the request type, eg -X POST.

You can specify the data to POST with **--data**, which will default to plain text data.

It's worth mentioning cURL does not store cookies, and you have to manually specify any cookies and values that you would like to send with your request. If you want to send cookies from cURL, use **-b or --cookie**.

Remember, cookies are not shared between different browsers (counting cURL as a browser here).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.nomanaziz.me/cybersecurity/penetration-testing/tryhackme/scripting/curl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
