Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 670 Bytes

request.rest

File metadata and controls

39 lines (23 loc) · 670 Bytes

// GET Method

GET http://localhost/rest-api/index.php HTTP/1.1

// Single GET Method

GET http://localhost/rest-api/index.php?id=101 HTTP/1.1

// POST Method

POST http://localhost/rest-api/index.php HTTP/1.1 Content-Type: application/x-www-form-urlencoded

username=tolgahan01 &first_name=tolgahan &last_name=acar &[email protected]

// DELETE Method

DELETE http://localhost/rest-api/index.php?id=102 HTTP/1.1

# // PUT Method

PUT http://localhost/rest-api/index.php HTTP/1.1 content-type: application/json

{
"id": 101, "username": "tolgahan02", "first_name": "tolgahan", "last_name": "acar", "email": "[email protected]"

}