- Http GET
http://localhost:8082/api/address/getById/3
Response:
{
"addressId": 3,
"street": "Any street",
"city": "Nagpur"
}
- Http GET
http://localhost:8080/api/student/getById/1
Response:
{
"id": 1,
"firstName": "Raj",
"lastName": "Dave",
"email": "raj_dave@yahoo.com",
"addressResponse": {
"addressId": 1,
"street": "Delhi",
"city": "Happy Street"
}
}
- Http Post - create address
curl --location --request POST 'http://localhost:8082/api/address/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"street": "Any street",
"city": "Nagpur"
}'
Sample Response:
{
"addressId": 3,
"street": "Any street",
"city": "Nagpur"
}