Skip to content

logmecn/timeout_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简体中文

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

About

Send data to a TimeOut Queue, and send an alert of API service URL When after TimeOut second

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages