How do I use curl to make a request from the command line? or What's the best way to make a request w

24 Replies, 1618 Views

Yo, curl make request is like magic. Here’s a cheat sheet:

- `-X GET` → Not needed, GET is default
- `-X POST -d 'data'` → Send data
- `-H "Header: value"` → Custom headers

Try this:
```
curl -X GET "https://api.github.com/users/octocat"
```

Messages In This Thread



Users browsing this thread: 1 Guest(s)