http-server

command module
v0.0.0-...-fabb7fb Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 8 Imported by: 0

README

http-server

This project implemented a HTTP/SQLite server. The server maintains a request multiplexer to process incoming requests. For each PUT/GET request, a corresponding store/query operation is implemented using the SQLite database.

Usage

Server

To build the project:

go run main.go

The server will listen on localhost:8080/

Client

Insert a row:

curl -X PUT http://localhost:8080 -H 'Content-Type: application/json' -d '{"key": "mykey", "value": "myvalue", "timestamp" : 1673524092123456}'

Fetch a row:

curl -X GET http://localhost:8080 -H 'Content-Type: application/json' -d '{"key":"mykey", "timestamp": 1673524092123456}'

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