How to perform a cURL request with a custom request header (e.g., X-Requested-With)?

To perform a cURL request with a custom request header, you can use the -H or --header option followed by the custom header value. Here is an example of how to perform a cURL request with a custom request header (X-Requested-With):

curl -H "X-Requested-With: XMLHttpRequest" <URL>

Replace <URL> with the actual URL you want to send the request to. In this example, the custom request header X-Requested-With is set to "XMLHttpRequest".