Skip to content

Instantly share code, notes, and snippets.

@lintianzhi
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save lintianzhi/5ebf1dd93388a54b4e68 to your computer and use it in GitHub Desktop.

Select an option

Save lintianzhi/5ebf1dd93388a54b4e68 to your computer and use it in GitHub Desktop.
MPChannel_api
POST /givememp
Content-Type: application/json

{"id": "my_id", "phone": 2345, "longtitude": "123.1123", "latitude", "323.231"}

200 OK
Content-Type: application/json

{"results": [...]}

results的长度为0表示没有匹配的对象,需要ping来轮询

POST /ihavamp
Content-Type: application/json

{"id": "my_id", "phone": 2345, "longtitude": "123.1123", "latitude", "323.231"}

200 OK
Body:
{"results": [...]}
POST /select
Content-Type: application/json

{"id": "my_id", "matched": "matched_id"}

200 OK
Content-Type: application/json

{"id": "matched_id", "phone": 2345, "longtitude": "123.1123", "latitude", "323.231"}
POST /ping
Content-Type: application/json

{"id": "my_id"}

200 OK
{} | {"id": "matched_id", "phone": 2345, "longtitude": "123.1123", "latitude", "323.231"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment