gentleman.v2: Index | Files

package bodytype

import ""


Package Files



var Types = map[string]string{
    "html":       "text/html",
    "json":       "application/json",
    "xml":        "application/xml",
    "text":       "text/plain",
    "urlencoded": "application/x-www-form-urlencoded",
    "form":       "application/x-www-form-urlencoded",
    "form-data":  "application/x-www-form-urlencoded",

Types is a map of MIME type aliases

func Set Uses

func Set(name string) p.Plugin

Set sets the Content Type header value, optionally based on a MIME type alias.

func Type Uses

func Type(name string) p.Plugin

Type is an alias to Set, which defines the Content-Type header

Package bodytype imports 3 packages (graph) and is imported by 10 packages. Updated 2020-02-23. Refresh now. Tools for package owners.