timeout_api

module
v0.0.0-...-0e7cbf1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2019 License: BSD-3-Clause

README

简体中文

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

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL