net

package
v0.0.0-...-93d8160 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 16 Imported by: 0

Documentation

Overview

* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyLoginURL

func VerifyLoginURL(network *Network) error

Types

type HttpError

type HttpError struct {
	Code    int
	Status  string
	Headers http.Header
	Body    string
}

func (HttpError) Error

func (err HttpError) Error() string

type Network

type Network struct {
	BrooklynUrl       string
	SkipSslChecks     bool
	Verbosity         string
	Credentials       string
	AuthorizationType string
}

func (*Network) NewDeleteRequest

func (net *Network) NewDeleteRequest(url string) *http.Request

func (*Network) NewGetRequest

func (net *Network) NewGetRequest(url string) *http.Request

func (*Network) NewPostRequest

func (net *Network) NewPostRequest(url string, body io.Reader) *http.Request

func (*Network) NewRequest

func (net *Network) NewRequest(method, path string, body io.Reader) *http.Request

func (*Network) SendDeleteRequest

func (net *Network) SendDeleteRequest(url string) ([]byte, error)

func (*Network) SendEmptyPostRequest

func (net *Network) SendEmptyPostRequest(url string) ([]byte, error)

func (*Network) SendGetRequest

func (net *Network) SendGetRequest(url string) ([]byte, error)

func (*Network) SendPostRequest

func (net *Network) SendPostRequest(urlStr string, data []byte) ([]byte, error)

func (*Network) SendPostRequestWithContentType

func (net *Network) SendPostRequestWithContentType(urlStr string, data []byte, contentType string) ([]byte, error)

func (*Network) SendPostResourceRequest

func (net *Network) SendPostResourceRequest(restUrl string, resourceUrl string, contentType string) ([]byte, error)

func (*Network) SendRequest

func (net *Network) SendRequest(req *http.Request) ([]byte, error)

func (*Network) SendRequestGetStatusCode

func (net *Network) SendRequestGetStatusCode(req *http.Request) ([]byte, int, error)

Jump to

Keyboard shortcuts

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