vscode http插件 restClient

下载插件 rest Client,在扩展中进行搜索就可以。
下面就是简单实用其实现 GET 和 POST 请求:

### GET
GET http://localhost:8080/coffee/

### POST
POST http://localhost:8080/order/ HTTP/1.1
content-type: application/json

{
    "customer": "latte",
    "items": ["1","2"]
}

-----------------------------------------------
Response:

HTTP/1.1 201 
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 14 Jun 2019 15:27:36 GMT

{
  "id": 1,
  "createTime": "2019-06-14T15:27:36.969+0000",
  "updateTime": "2019-06-14T15:27:36.969+0000",
  "customer": "latte",
  "items": [],
  "state": "INIT"
}

你可能感兴趣的:(计算机网络)