http

package
v0.0.0-...-faefad5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: GPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URLSystemInformation = "/libs/granite/operations/content/systemoverview/export.json"
	URLActivateTree      = "/etc/replication/treeactivation.html"
	URLBundles           = "/system/console/bundles"
	URLRebuildPackage    = "/crx/packmgr/service/.json%s?cmd=build"
	URLBundlePage        = "/system/console/bundles/%s"
	URLReplication       = "/bin/replicate.json"
	URLPackageList       = "/crx/packmgr/list.jsp"
	URLPackageEndpoint   = "/crx/packmgr/service.jsp"

	ServiceName = "aem-cli"

	JarContentType        = "application/java-archive"
	ApplicationFormEncode = "application/x-www-form-urlencoded"
)

URLS aem

Variables

This section is empty.

Functions

func DisableSSLValidation

func DisableSSLValidation()

DisableSSLValidation Disables SSL validation

func DownloadFile

func DownloadFile(destination string, uri string, username string, password string, forceDownload bool) (uint64, error)

DownloadFile download file from string url

func DownloadFileWithURL

func DownloadFileWithURL(destination string, uri *url.URL, forceDownload bool) (uint64, error)

DownloadFileWithURL file with url.URL

func Get

func Get(uri *url.URL) ([]byte, error)

Get Perform a simple get request

func GetPlain

func GetPlain(uri string, username string, password string) ([]byte, error)

GetPlain does a plain get request to an URL

func GetPlainWithHeaders

func GetPlainWithHeaders(uri string, username string, password string, header []Header) ([]byte, error)

GetPlainWithHeaders Do a plain request with specific headers

func GetWithHeaders

func GetWithHeaders(uri *url.URL, header []Header) ([]byte, error)

GetWithHeaders Do a get request with url.URL

func Post

func Post(uri *url.URL, body *bytes.Buffer) ([]byte, *http.Response, error)

Post Perform a HTTP POST

func PostFormEncode

func PostFormEncode(uri string, username string, password string, data url.Values) ([]byte, *http.Response, error)

PostFormEncode post form encoded form

func PostMultiPart

func PostMultiPart(uri string, username string, password string, data map[string]string) ([]byte, *http.Response, error)

PostMultiPart post multipart form

func PostMultiPartWithHeaders

func PostMultiPartWithHeaders(uri string, username string, password string, data map[string]string, header []Header) ([]byte, *http.Response, error)

PostMultiPartWithHeaders Post multipart form With the ability to add headers

func PostPlain

func PostPlain(uri string, username string, password string, body *bytes.Buffer) ([]byte, *http.Response, error)

PostPlain Simple HTTP POST with url string

func PostPlainWithHeaders

func PostPlainWithHeaders(uri string, username string, password string, body *bytes.Buffer, header []Header) ([]byte, *http.Response, error)

PostPlainWithHeaders Simple HTTP POST with url string and define the headers

func PostWithHeaders

func PostWithHeaders(uri *url.URL, body *bytes.Buffer, header []Header) ([]byte, *http.Response, error)

PostWithHeaders Do a HTTP POST and define the headers used

func URLToURLString

func URLToURLString(u *url.URL) string

URLToURLString convert the url to string

func Upload

func Upload(uri, username, password string, body *bytes.Buffer, httpHeaders []Header) (*http.Response, error)

Upload bytes.buffer with string username, password and uri

func UploadWithURL

func UploadWithURL(uri *url.URL, body *bytes.Buffer, httpHeaders []Header) (*http.Response, error)

UploadWithURL upload bytes.buffer with *url.URL

Types

type Header struct {
	Key   string
	Value string
}

Header general http header struct

Jump to

Keyboard shortcuts

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