Skip to content
/ mina Public

Imitates HTTP requests and responses of a chosen host

License

Notifications You must be signed in to change notification settings

sariina/mina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mina

Build Status

Mina saves API server responses to disk and serves them with its own HTTP server. Some use cases include:

  • working with the API server when you or the server is offline
  • each request costs money
  • API server forces rate limits
  • etc.

Install

go get -u github.com/sariina/mina

Example

Start a mina server for Github API on port 8080:

mina -addr=:8080 -target=https://api.github.com

In your client/broweser/app, instead of sending a request to

https://api.github.com/users/sariina

send it to

http://localhost:8080/users/sariina

Voila, the same response. The response is saved to your disk. Your app will think that you are using Github API even when you are offline.

Options

mina --help

Usage:
  mina -addr=<addr> -target=<target> [-o=<dir>] [-H=<header>] [-log=<logfile>]...

Options:
-addr    address to listen to
-target  target to route to
-H       [optional] custom header
-o       [optional] cache dir
-log	 [optional] log file

Example:
  mina -addr=:8080 -target=https://www.domain.com:9000

Why mina?

Mina is named after the Myna bird (Persian: مرغ مینا), renowned for their ability to imitate speech.

About

Imitates HTTP requests and responses of a chosen host

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •