httpecho

command module
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

httpecho

Overview

httpecho is an HTTP echo server that allows you to test various HTTP request and response behaviors. It supports several query parameters to adjust the response behavior.

Installation

grm install jsnjack/httpecho

Usage

To start the HTTP echo server, use the following command:

httpecho start
Query Parameters
  • sleep: Delay the response for the specified duration. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Example: ?sleep=5s
  • status: Return the response with the specified status code. Example: ?status=200
  • size: On top of headers, add data of specific size to the response body. Supported units are "KB", "MB", "GB". Example: ?size=200KB
  • header: Add additional headers to the response. Example: ?header=Content-Type:text/plain
  • verbose: Log the full request (headers and body) to stdout. Example: ?verbose=true
Example

To start the server on a specific address and port:

httpecho start --bind 127.0.0.1:8008

To start the server with a certificate for HTTPS:

httpecho start --bind 127.0.0.1:8008 --cert /path/to/cert.pem

Documentation

Overview

Copyright © 2021 Yauhen Shulitski

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
Package cmd ...
Package cmd ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL