Request

1.Interface address=>HTTP

http://ip:port/path/

DEMO如下:

POST http://127.0.0.1:9008/login/{bizType} # login
POST http://127.0.0.1:9008/register/{bizType} # register
POST http://127.0.0.1:9008/logout # logout
POST http://127.0.0.1:9008/global/{bizType} # other request
...

Request method: POST

1.2 Request

Request header information
Request body information, transmitted in the form of content-type=application/json

1.2.1 Header Request Parameters

1.2.2 Request Body Parameters

1.2 Interface address=>websocket

ws://ip:port/path/ws

The DEMO is as follows:

ws://127.0.0.1:9008/ws

Pass in parameters:

The DEMO is as follows:

{
  "header": {
    "trace": "trace",
	"token": "token",
    "bizType": "customer.CustomerWebApiService.login",
    "version": "0.0.1",
	"group": "",
    "companyId": 11,
	"timestamp": 11111131331,
	"lang":"zh-CN"
  },
  "body": {
    "type": 3,
    "loginName": "139"
  }
}

The heartbeat format is as follows: bizType is fixed to ping

{
  "header": {
    "trace": "trace",
	"token": "token",
    "bizType": "ping",
	"sendTime":1617246557505,
	"lang":"zh-CN",
	"timestamp": 11111131331
  }
}

The format of the heartbeat return message body is as follows: bizType is fixed to pong

{
  "trace": "Original parameters returned",
  "token": "Original parameters returned",
  "bizType": "pong",
  "sendTime": 1617678792458,
  "lang": "zh-CN"
}

Return parameter:

Last updated