gentleman.v2: gopkg.in/h2non/gentleman.v2/plugins/bodytype Index | Files

package bodytype

import "gopkg.in/h2non/gentleman.v2/plugins/bodytype"

Index

Package Files

bodytype.go

Variables

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.