debughttpd

command module
v0.0.0-...-5b786ee Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 6 Imported by: 0

README

debughttpd

Simple logging HTTP server for debugging purposes

Usage of ./debughttpd:
  -a string
        server address, format: '<hostname|ip-address>:<port>' (default ":8080")
  -c string
        content to return to the client; given as string value on the command line
  -cf string
        filename of the content to return to the client
  -ct string
        content type of the response (default "text/plain")
  -s int
        status code of the response (default 200)

Usage example

$ ./debughttpd -a localhost:8888 -c '{"foo":"foobar"}' -ct "application/json"
>> Listening on localhost:8888
>> Serving content: {"foo":"bar"}, Content-Type: application/json
>> Request URL: /test | Timestamp: 2023-09-03 16:19:18 | Method: POST
POST /test HTTP/1.1
Host: localhost:8888
Accept: */*
Content-Length: 18
Content-Type: application/x-www-form-urlencoded
User-Agent: curl/8.2.1

message=helloworld

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