testserver

command
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 8 Imported by: 0

README

Simple HTTP test server

Usage: go run . [-s] [bindaddr]

Listens on bindaddr (default :8080) for HTTP requests (HTTPS if -s specified), and logs the Go http.Request and returns status 200 on request.

Using HTTPS

To listen with HTTPS, use testserver/key.pem to authenticate the server. This is a self-signed certificate, so some clients may reject it for that reason.

Example:

# Note: -k for insecure, because the cert is self-signed
$ curl -k --capath testserver 'https://localhost:80/some/path'

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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