HTTP Methods


Web API Practice.

Learn different HTTP methods (POST, PUT, DELETE, PATCH)



Challenges

POST Data

Learn to send data using POST requests.

Objective

Send a POST request to /api/submit with a JSON body containing {"action": "unlock"}

Example

curl -X POST -H "Content-Type: application/json" -d '{"action": "unlock"}' http://challenge/api/submit

Good luck!

Connect with SSH

Link your SSH key, then connect with: ssh hacker@dojo.idg.ctf

PUT Update

PUT is used to update or replace a resource.

Objective

Send a PUT request to /api/user/1 with JSON body {"status": "active"}

Example

curl -X PUT -H "Content-Type: application/json" -d '{"status": "active"}' http://challenge/api/user/1

Good luck!

Connect with SSH

Link your SSH key, then connect with: ssh hacker@dojo.idg.ctf

DELETE Resource

DELETE is used to remove a resource.

Objective

Send a DELETE request to /api/item/42

Example

curl -X DELETE http://challenge/api/item/42

Good luck!

Connect with SSH

Link your SSH key, then connect with: ssh hacker@dojo.idg.ctf

PATCH Modify

PATCH is used to partially modify a resource.

Objective

Send a PATCH request to /api/config with JSON body {"debug": true}

Example

curl -X PATCH -H "Content-Type: application/json" -d '{"debug": true}' http://challenge/api/config

Good luck!

Connect with SSH

Link your SSH key, then connect with: ssh hacker@dojo.idg.ctf

30-Day Scoreboard:

This scoreboard reflects solves for challenges in this module after the module launched in this dojo.

Rank Hacker Badges Score