Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 845 Bytes

File metadata and controls

64 lines (50 loc) · 845 Bytes

Basic microservices With Web Client

  1. Http GET
http://localhost:8082/api/address/getById/3

Response:

{
    "addressId": 3,
    "street": "Any street",
    "city": "Nagpur"
}

  1. 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"
    }
}

  1. 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"
}