Giter Club home page Giter Club logo

callmelater's Introduction

Call Me Later

Schedule HTTP requests later in time. Also known as Delayed requests or Delayed sending.

Usage

Call-me-later is "almost" a proxy. or rather a delayed proxy. Call your services "in the future".

Everything stays the same, with some minor tweaks. Call-me-later will always respond with a 202 accepted for any properly formed request, you will not get a direct response back. Call-me-later needs a few header values in order to know what to do with the request.

  • X-Later-Request-URL the URL to call later
  • X-Later-Request-When when to call it, e.g. 1h to schedule the call 1 hour from now. or 10m5s for 10 minutes and 5 seconds.
  • X-Later-Response-URL optional response callback URL to send any response data to
  • X-Later-Response-Method optional response callback method to use for the response callback

Any headers and content will be forwarded as is to the target Request URL once the scheduled time is reached. The HTTP method of the call to the Call-me-later service will be captured and used for the request to the target URL.

Any response from the called service can optionally be sent to a callback URL using the X-Later-Response-URL and X-Later-Response-Method. The same pattern applies there, any headers and content will be forwarded as is to the target URL.

Persistence

The service will persist all requests using a RequestStorage interface. The requests are then stored until they are eventually called once the When criteria is met.

Community

Pull requests are welcome. Support for more persistence providers would be welcome.

Example call:

curl --location --request GET 'http://localhost:10000/later' \
--header 'X-Later-Request-Url: http://github.com' \
--header 'X-Later-When: 10s' \
--header 'X-Later-Response-Url: http://some-callback-url.com' \
--header 'X-Later-Response-Method: POST' \

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.