https://github.com/oleoneto/mock-http
CLI tool for making requests and mocking server responses
https://github.com/oleoneto/mock-http
go http-server yaml
Last synced: about 1 year ago
JSON representation
CLI tool for making requests and mocking server responses
- Host: GitHub
- URL: https://github.com/oleoneto/mock-http
- Owner: oleoneto
- Created: 2025-01-21T18:29:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-06T17:00:31.000Z (over 1 year ago)
- Last Synced: 2025-04-24T05:45:15.366Z (about 1 year ago)
- Topics: go, http-server, yaml
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mock-http
Mock HTTP is a CLI tool for making requests and mocking server responses
**Table of Contents**
- [mock-http](#mock-http)
- [Installation](#installation)
- [Commands](#commands)
- [mockhttp](#mockhttp)
- [server](#server)
- [http](#http)
- [version](#version)
- [To Do](#to-do)
## Installation
```
make install
```
## Commands
Assume the installed binary is called `mockhttp`.
### mockhttp
```
Usage:
mockhttp [flags]
mockhttp [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
http Make HTTP requests
server Run a mock HTTP server
version Shows the version of the CLI
Flags:
-h, --help help for mockhttp
-o, --output string output format (default "yaml")
--time time executions
--verbose enable detailed logging
Use "mockhttp [command] --help" for more information about a command.
```
### server
```
Run a mock HTTP server
Usage:
mockhttp server [flags]
Flags:
-f, --file string
-h, --help help for server
-p, --port int (default 3333)
-r, --show-routes
Global Flags:
-o, --output string output format (default "yaml")
--time time executions
--verbose enable detailed logging
```
### http
```
Make HTTP requests
Usage:
mockhttp http [flags]
Flags:
-f, --file string
-h, --help help for http
Global Flags:
-o, --output string output format (default "yaml")
--time time executions
--verbose enable detailed logging
```
### version
```
Shows the version of the CLI
Usage:
mockhttp version [flags]
Flags:
-h, --help help for version
Global Flags:
-o, --output string output format (default "yaml")
--time time executions
--verbose enable detailed logging
```
## To Do
[Check out open issues](https://github.com/oleoneto/mock-http/issues).