All Projects → pierreprinetti → Apimock

pierreprinetti / Apimock

Licence: mit
A mock API server.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Apimock

Puer Mock
Puer + Mock.js = A configurable mock server with configurable mock(random) data.
Stars: ✭ 497 (+324.79%)
Mutual labels:  mock-server
Easy Mock Server
A mock server for json and mock template files
Stars: ✭ 22 (-81.2%)
Mutual labels:  mock-server
Httplive
HTTP Request & Response Service, Mock HTTP
Stars: ✭ 1,094 (+835.04%)
Mutual labels:  mock-server
Apisprout
Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation
Stars: ✭ 519 (+343.59%)
Mutual labels:  mock-server
Sharingan
Sharingan(写轮眼)是一个基于golang的流量录制回放工具,适合项目重构、回归测试等。
Stars: ✭ 617 (+427.35%)
Mutual labels:  mock-server
Wiremockui
Wiremock UI - Tool for creating mock servers, proxies servers and proxies servers with the option to save the data traffic from an existing API or Site.
Stars: ✭ 38 (-67.52%)
Mutual labels:  mock-server
Wiremock
A tool for mocking HTTP services
Stars: ✭ 4,790 (+3994.02%)
Mutual labels:  mock-server
Mock server
A lightweight Sinatra application backed by sqlite that can mock ReST responses. Has interface to easily create, search & maintain mocks. No need to program mocks into a language specific implementation.
Stars: ✭ 107 (-8.55%)
Mutual labels:  mock-server
Atmo
✔️ Mock data for your prototypes and demos. Remote deployments to Zeit now.
Stars: ✭ 802 (+585.47%)
Mutual labels:  mock-server
Oauth2 Mock Server
A development and test oriented OAuth2 mock server
Stars: ✭ 54 (-53.85%)
Mutual labels:  mock-server
Ohhttpstubs
Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!
Stars: ✭ 4,831 (+4029.06%)
Mutual labels:  mock-server
Fxtest
接口自动化测试平台——python+flask版,支持http协议,java 版本开发完毕https://github.com/liwanlei/plan
Stars: ✭ 564 (+382.05%)
Mutual labels:  mock-server
Mockserver Client Node
MockServer javascript client for browsers, Node.js or any grunt build
Stars: ✭ 52 (-55.56%)
Mutual labels:  mock-server
Karate
Test Automation Made Simple
Stars: ✭ 5,497 (+4598.29%)
Mutual labels:  mock-server
Httpmock
HTTP mocking library for Rust.
Stars: ✭ 76 (-35.04%)
Mutual labels:  mock-server
Drakov
Mock Server that implements the API Blueprint specification
Stars: ✭ 467 (+299.15%)
Mutual labels:  mock-server
Mock Server
Easy to use, no frills http mock server
Stars: ✭ 27 (-76.92%)
Mutual labels:  mock-server
Mitm Scripts
🔄 A collection of mitmproxy inline scripts
Stars: ✭ 109 (-6.84%)
Mutual labels:  mock-server
React Easy Start
A lightweight ant-design-pro based on create-react-app.
Stars: ✭ 102 (-12.82%)
Mutual labels:  mock-server
Mockstar
Demo project on How to be a Mockstar using Mockito and MockWebServer.
Stars: ✭ 53 (-54.7%)
Mutual labels:  mock-server

apimock

Go Report Card Build Status

This is a very basic fake API server. I use it to build the front-end of web applications, without the need for the backend to be ready.

It is an in-memory, non-persistent key-value store you can fill with PUT requests, where the request path is the key and the request body is the value. Retrieve the saved value with a subsequent GET request at the same endpoint.

apimock will serve back the same Content-Type is has received. If no Content-Type header was sent with the PUT request, the DEFAULT_CONTENT_TYPE environment variable will be sent.

apimock is meant for prototyping. Please do NOT use it in production.

Example:

$ HOST=localhost:8800 apimock &
$ curl -X PUT -d '{"message": "This is not a pipe"}' localhost:8800/my/endpoint
> {"message": "This is not a pipe"}
$ curl -X GET localhost:8800/my/endpoint
> {"message": "This is not a pipe"}
$ curl -X DELETE localhost:8800/my/endpoint
$ curl -X GET localhost:8800/my/endpoint
$

Content-Type

Apimock will remember the Content-Type associated with every request. This behaviour can be modified with the environment variables:

  • DEFAULT_CONTENT_TYPE: When the PUT request doesn't bear a Content-Type, this one will be used. If not specified, this is text/plain.
  • FORCED_CONTENT_TYPE: The specified string will be used as Content-Type no matter what is transmitted with the PUT request.

Docker container

docker run --name apimock -p 8800:8800 -d pierreprinetti/apimock:latest

Features

It currently supports:

  • [x] CORS headers (responses always bear Allow-Origin: * and a bunch of authorized headers and methods)
  • [x] OPTIONS
  • [x] PUT
  • [x] GET
  • [x] DELETE
  • [x] Content-Type header

What it might support in the future:

  • [ ] POST to an endpoint with fake ID generator (e.g. POST to example.com/items would result in the storage of the element in example.com/items/1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].