posts/

directory
v0.0.0-...-b3bf091 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: Apache-2.0

README

Web - Posts and Forms

Learn the basics of making POST calls and working with multipart form data.

Notes

  • The standard library has much of what you need to build services and apps.
  • The net/http package provides the building blocks.
  • There are other great packages in the Go ecosystem to help.

https://golang.org/pkg/net/http/
https://golang.org/doc/articles/wiki/

Code Review

Basic POST: Code | Test
Simple Form: Code | Test
Structured Form Parsing: Code | Test
Multipart Forms: Code | Test

Exercises

Exercise 1

Take the multipart writer example and add support for a new form field that would specify the name of the folder to use for the uploaded image. If it does not exist use the current directory as the default. Then update the test to validate the code change.


All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
Sample program to show how to handle different HTTP verbs.
Sample program to show how to handle different HTTP verbs.
Sample program to show how to handle forms using a single handler for the GET and POST calls.
Sample program to show how to handle forms using a single handler for the GET and POST calls.
Sample program to show how to decode forms into structs.
Sample program to show how to decode forms into structs.
Sample program to show how to handle the uploading of file content in a request.
Sample program to show how to handle the uploading of file content in a request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL