form

command
v0.0.0-...-1628972 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 3 Imported by: 0

README

Form Decoder Example

$ go run form/main.go
$ curl -XPOST \
-d "username=foo&password=bar" \
http://localhost:8080/login
username: foo, password: bar

$ curl -XPOST \
-H "Content-Type: application/json" \
-d '{"username":"foo", "password": "bar"}' \
    http://localhost:8080/login
username: foo, password: bar

$ curl -XPOST \
-H "Content-Type: application/xml" \
-d '<xml><username>foo</username><password>bar</password></xml>' \
    http://localhost:8080/login
username: foo, password: bar

$ curl -XPOST \
-F "username=foo" -F "password=bar" \
    http://localhost:8080/login
username: foo, password: bar

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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