Skip to content

Instantly share code, notes, and snippets.

@newarsubhas
newarsubhas / gist:d820c5d3d0e3c19aba4d66e2a17a9b24
Created July 15, 2019 18:15 — forked from oderwat/gist:9158840
GoLang HTTP PUT / DELETE (just copied from somewhere else!)
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
const (
@newarsubhas
newarsubhas / main.go
Created May 31, 2019 16:32 — forked from alyssaq/main.go
GET and POST golang API
/*
* Sample API with GET and POST endpoint.
* POST data is converted to string and saved in internal memory.
* GET endpoint returns all strings in an array.
*/
package main
import (
"encoding/json"
"flag"