Skip to content

Instantly share code, notes, and snippets.

@oscarryz
Created May 21, 2014 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oscarryz/256eda0bd12e8ff37770 to your computer and use it in GitHub Desktop.
Save oscarryz/256eda0bd12e8ff37770 to your computer and use it in GitHub Desktop.
body := ioutil.NopCloser(strings.NewReader(v.Encode()))
postRequest , _ := http.NewRequest("POST", "http://httpbin.org/post", body)
postRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded")
postRequest.ParseForm()
postRequest.Body = body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment