mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-11 01:29:11 +00:00
📝
This commit is contained in:
parent
c5b54a0511
commit
d86e8a739e
@ -8,8 +8,8 @@ import (
|
|||||||
wasmhttp "github.com/nlepage/go-wasm-http-server"
|
wasmhttp "github.com/nlepage/go-wasm-http-server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Example_JSON demostrates a simple hello JSON service.
|
// Example_json demostrates a simple hello JSON service.
|
||||||
func Example_JSON() {
|
func Example_json() {
|
||||||
http.HandleFunc("/hello", func(res http.ResponseWriter, req *http.Request) {
|
http.HandleFunc("/hello", func(res http.ResponseWriter, req *http.Request) {
|
||||||
params := make(map[string]string)
|
params := make(map[string]string)
|
||||||
if err := json.NewDecoder(req.Body).Decode(¶ms); err != nil {
|
if err := json.NewDecoder(req.Body).Decode(¶ms); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user