Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 816 Bytes

README.md

File metadata and controls

14 lines (10 loc) · 816 Bytes

go-post-example

Build Status Go Report Card

Golang example to do HTTP POST request from client and handle the request in server side.

Client

  • Values.Encode() encodes the values into “URL encoded” form ("bar=baz&foo=quux") sorted by key.
  • POST JSON to server and read response.

Server

  • Request.ParseForm() will parse form data and update Request.PostForm.
  • Unmarshal JSON from POST data to a struct.