Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 1.08 KB

File metadata and controls

28 lines (23 loc) · 1.08 KB

简体中文

Time Out Trigger API

timeout_api is a Trigger which can send a defined URL, when time is out.

Installation

go get github.com/logmecn/timeout_api

Usage

Run the execute file, it will work on 8001 port (default). then post a json data for example:

curl -d '{"data":"aaaa=bbb","url":"http://127.0.0.1:8001","tout":5}' http://127.0.0.1

The program will visit URL: http://127.0.0.1:8001?aaaa=bbb after {tout} second. (in this case is 5s)

key value describe example
data string params of url's key1=value1&key2=value2
url string the visit url of call back, when the timeout. http://pages\.com/?mkey=mvalue
tout int the second of time out 5

The url will visit is url+data,eg: http://pages.com/?mkey=mvalue&key1=value1&key2=value2