body

package
v0.0.0-...-91bfadb Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Text       = "text/plain"
	JavaScript = "application/javascript"
	Json       = "application/json"
	Html       = "text/html"
	Xml        = "application/xml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body interface {
	GetData() string
	GetContentType() string
	Encode() io.Reader
}

type Form

type Form struct {
	// contains filtered or unexported fields
}

func NewFormData

func NewFormData() *Form

func (*Form) Encode

func (this *Form) Encode() io.Reader

func (*Form) GetContentType

func (this *Form) GetContentType() string

func (*Form) GetData

func (this *Form) GetData() string

func (*Form) SetBoundary

func (this *Form) SetBoundary(boundary string) *Form

func (*Form) SetData

func (this *Form) SetData(name, value string) *Form

func (*Form) SetFile

func (this *Form) SetFile(name, file string) *Form

type Raw

type Raw struct {
	// contains filtered or unexported fields
}

func NewRawData

func NewRawData() *Raw

func (*Raw) Encode

func (this *Raw) Encode() io.Reader

func (*Raw) GetContentType

func (this *Raw) GetContentType() string

func (*Raw) GetData

func (this *Raw) GetData() string

func (*Raw) SetData

func (this *Raw) SetData(data, format string)

type Url

type Url struct {
	// contains filtered or unexported fields
}

func NewUrlEncode

func NewUrlEncode() *Url

func (*Url) Encode

func (this *Url) Encode() io.Reader

func (*Url) GetContentType

func (this *Url) GetContentType() string

func (*Url) GetData

func (this *Url) GetData() string

func (*Url) SetData

func (this *Url) SetData(name, value string) *Url

Jump to

Keyboard shortcuts

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