How do I use curl to make a request? Need help with the syntax! or What's the correct way to curl mak

18 Replies, 1097 Views

Pro tip: Use `httpie` instead of curl. Way more human-friendly.

But if you’re stuck with curl make request:

```
curl -G \
"https://example.com/api" \
--data-urlencode "search=query" \
-H "User-Agent: MyApp"
```

`-G` + `--data-urlencode` = clean GET params.

Messages In This Thread



Users browsing this thread: 1 Guest(s)