How do I send GET and POST requests with parameter gimmeflag
and value please
to the URL http://103.200.7.150:7777/
using curl
on the command line?
Ubuntu – How to send GET and POST requests using Curl
14.04command linecurlsyntax
14.04command linecurlsyntax
How do I send GET and POST requests with parameter gimmeflag
and value please
to the URL http://103.200.7.150:7777/
using curl
on the command line?
Best Answer
Seems like you following a tutorial or book and this is a cheeky way to test if you got the basics down.
Let's break it down into two parts since you want to know how its done with
curl
(seeman 1 curl
or the curl manual).Using GET to send your request:
This one is pretty easy if you know how a
query-string
looks like.You want to send a parameter
gimmeflag
and a valueplease
. So the line you want to request withcurl
is :Using POST to send your request:
Given the GET line the POST is pretty easy too just replace GET by POST:
To conclude this: