• Stars
    star
    132
  • Rank 273,392 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A HTTP mole service

httpmole

Build Status

httpmole provides a HTTP mock server that will act as a mole among your services, telling you everything http clients send to it and responding them whatever you want it to respond. Just like an actual mole.

Features:

  • Use response-status and response-header to quickly spin up a http server.
  • Use response-file to modify the response in real time using a text editor.
  • Use response-from to act as a proxy and be able to inspect the request/response going to a given service.

Install

go install github.com/jcchavezs/httpmole/cmd/httpmole

Usage

Using the binary

httpmole -p=8082 -response-status=200

or using a response file:

httpmole -p=8082 -response-file=./myresponse.json
// myresponse.json
{
    "status_code": 200,
    "headers": {
        "content-type": "application/json"
    },
    "body": {
        "message": "I am real"
    }
}

or proxying a service to inspect the incoming requests:

httpmole -p=8082 -response-from=therealservice:8082

Using docker

docker run -p "10080:10080" jcchavezs/httpmole -response-status=201

or pass a response file over volumes

docker run -p "10080:10080" -v `pwd`/response.json:/httpmole/response.json jcchavezs/httpmole -response-file=/httpmole/response.json

Docker image is hosted in dockerhub

httpmole is heavily inspired by httplab

More Repositories

1

cmb2-conditionals

Plugin to relate fields in a CMB2 metabox
PHP
83
star
2

porto

Tool for adding vanity import to Go code
Go
38
star
3

cmb2-taxonomy

Custom metaboxes for taxonomies
PHP
34
star
4

coraza-http-wasm-traefik

Go
26
star
5

zipkin-instrumentation-symfony

A Zipkin integration for Symfony applications
PHP
25
star
6

zipkin-php-opentracing

Zipkin implementation for OpenTracing API
PHP
24
star
7

opentracing-php

MOVED TO https://github.com/opentracing/opentracing-php
PHP
18
star
8

dd-trace-php

[DEPRECATED] Use https://github.com/dataDog/dd-trace-php instead
PHP
18
star
9

zipkin-instrumentation-guzzle

Zipkin instrumentation for Guzzle HTTP Client
PHP
13
star
10

envoy-config-schema

JSON schema for Envoy's config
Makefile
11
star
11

coraza-http-wasm

http-wasm middleware based on Coraza WAF
Go
10
star
12

httptest-php

PHP Library for HTTP integration testing
PHP
9
star
13

pre-commit-kotlin

pre-commit for kotlin
Shell
7
star
14

aws-xray-sdk-php

[WIP] AWS X-Ray SDK
PHP
7
star
15

dd-opentracing-symfony

[WIP] An OpenTracing + DataDog library for instrumenting a Symfony application
PHP
6
star
16

mdctx

Mapped Diagnostic Context for logging in golang
Go
6
star
17

zipkin-php-reporter-kafka

Zipkin PHP Reporter for Kafka transport
PHP
5
star
18

zipkin-instrumentation-doctrine

Zipkin instrumentation for Doctrine ORM
PHP
4
star
19

nanotime-php

An abstraction for nanotime in PHP.
PHP
4
star
20

dd-opentracing-php

[DEPRECATED] Use https://github.com/dataDog/dd-trace-php
PHP
3
star
21

coraza-exec-action-wasm

Go
3
star
22

coraza-httpbin

httpbin server with coraza as reverse proxy
Go
2
star
23

pre-commit-golang

Golang hooks for pre-commit
Shell
2
star
24

jquery-formChange

Check if the elements of a form have changed.
JavaScript
1
star
25

graphs-theorems

This is a set of implementations of well known theorems in graphs theory
Scala
1
star
26

jaeger2zipkin

Turn downloaded jaeger traces into zipkin ones
PHP
1
star
27

bootstrap-modalbox

A bootstrap plugin for easy management of modalboxes
HTML
1
star
28

zipkin-agent

Agent for Zipkin V2
Go
1
star
29

wasm-tracing

tracing enrichment for wasm plugins
Go
1
star
30

traefik-kind

Traefik v3 running over Kind
Makefile
1
star