A simple http-web server logging incoming requests to stdout with simple http-interface.

http-cli-echo-logger

A simple http-web server logging incoming requests to stdout with simple http-interface.

Run locally

go run ./cmd/main.go
  • Default app port - 8080
  • Default echo endpoint - /echo

Run with docker

Run a container:

docker run -it -p8088:8080 andboson/http-cli-echo-logger 

Exec curl request to the /echo endpoint:

curl -X 'POST' -i \
  'http://localhost:8088/echo?new=1' \       
  -H 'accept: application/json' \  
  -H 'Content-Type: application/json' \
  -d '{
      "foo":"bar"   
    }'

This response will be returned as an answer. Also, this request will be logged in docker console:

POST
RemoteAddr: 172.90.20.1:47694
RequestURI: /echo?new=1
 Content-Type: application/json
 Content-Length: 17
 User-Agent: curl/7.74.0
 Accept: application/json
Body:
 {
  "foo":"bar"
}

You can see the history of requests in your browser http://localhost:8088/

Screenshot from 2021-11-20 19-05-33

Owner
Andrii Bosonchenko
backend developer
Andrii Bosonchenko
Similar Resources

Fast, multi-platform web server with automatic HTTPS

Fast, multi-platform web server with automatic HTTPS

a project Every site on HTTPS Caddy is an extensible server platform that uses TLS by default. Releases · Documentation · Get Help Menu Features Insta

Jan 1, 2023

Lightweight go web server that provides a searchable directory index.

autoindex Lightweight go web server that provides a searchable directory index. Optimized for handling large numbers of files (100k+) and remote file

Jan 5, 2023

Static Content Web Server

Static Content Web Server The main purpose of the project is to develop static server that can be used with modern javascript frameworks (React, vue.j

Dec 17, 2021

Web server for running Brainfuck on the backend

Brainfuck Web Server Web server for running Brainfuck on the backend Run go run . brainfuck file The server will start on port 8080 by default. You

Oct 25, 2021

Golang-redis-webserver - Web server using redis

Web Server using Redis Api REST Database SQLITE3 Cache Redis # Creating record s

Jun 19, 2022

Fishserver is designed to quickly add HTTP handlers to HTTP servers. It supports registration of various HTTP

Fishserver is designed to quickly add HTTP handlers to HTTP servers. It supports registration of various HTTP

Fishserver is designed to quickly add HTTP handlers to HTTP servers. It supports registration of various HTTP. Handler interface types such as Gin Engine, Go's built-in HTTP. HandlerFunc, or http.ServeMux. The HTTP server can be configured quickly with options and can be used for test cases.

Nov 1, 2021

A simple HTTP Server to share files over WiFi via Qr Code

A simple HTTP Server to share files over WiFi via Qr Code

go-fileserver A simple HTTP server to share files over WiFi via QRCode Installation You can download compressed version from

Oct 8, 2022

Simple HTTP server written in golang

Simple HTTP server written in golang Simple webserver in golang, to demonstrate basic functionalities like e.g. sending back some request header info,

Aug 31, 2022

Go-simplehttp - Simple HTTP server written in golang

Simple HTTP server written in golang Simple webserver in golang, to demonstrate

Jan 1, 2022
Comments
  • HTTP headers are not printed in a consistent order

    HTTP headers are not printed in a consistent order

    Seems like HTTP headers are not printed in a consistent order through the CLI and the web interface. This is kind of annoying when trying to view multiple requests to the same endpoint.

    Picture of this in the web interface: https://imgur.com/MjSYvQz

    GIF of this happening in the CLI: https://imgur.com/CBQOtZN

    From my knowledge of Go, I'd guess this is map behavior causing this.

A simple Go HTTP server that proxies RPC provider requests

go-rpc-provider-proxy A simple Go HTTP server that proxies RPC provider requests.

Nov 21, 2021
Go web server - A web server that can accept a GET request and serve a response.

go_web_server A web server that can accept a GET request and serve a response. Go is a great language for creating simple yet efficient web servers an

Jan 3, 2022
A very simple Golang server handling basic GET and POST requests

GOLANG SERVER INTRO As a true Blockchain enthusiast, I had to learn Solidity and Golang to participate to several projects. This repository consists o

Nov 17, 2021
a simple http server as replacement of python -m http.server

ser a simple http server as replacement of python -m http.server

Dec 5, 2022
A simple server with REST API to keep track of your TODOs (with html interface).
A simple server with REST API to keep track of your TODOs (with html interface).

TODOserver A simple server written in GO using gin and gorm. Getting started Download the repository docker build -t todoserver . docker run -p 8888:8

Nov 10, 2021
:tophat: Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support
:tophat: Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support

Web server with built-in support for QUIC, HTTP/2, Lua, Markdown, Pongo2, HyperApp, Amber, Sass(SCSS), GCSS, JSX, BoltDB (built-in, stores the databas

Jan 1, 2023
HTTP Echo is a go web server that echos back the arguments given to it.

HTTP Echo is a go web server that echos back the arguments given to it. This is especially useful for demos or a more extensive "hello world" application in Docker or Kubernetes.

Jan 3, 2023
OpenAPI specs for your Go server, generated at server runtime. No CLI, no code generation, and no HTTP

Overview "oas" is short for "OpenAPI Spec". Go package for generating OpenAPI docs at runtime. Non-features: No code generation. No CLI. No magic comm

Dec 3, 2021
Heart 💜A high performance Lua web server with a simple, powerful API
Heart 💜A high performance Lua web server with a simple, powerful API

Heart ?? A high performance Lua web server with a simple, powerful API. See the full documentation here. Overview Heart combines Go's fasthttp with Lu

Aug 31, 2022
Oogway is a simple web server with dynamic content generation and extendability in mind supporting a Git based workflow.

Oogway Oogway is a simple web server with dynamic content generation and extendability in mind supporting a Git based workflow. It's somewhere in betw

Nov 9, 2022