httputils

package
v0.0.0-...-704be5b Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MulanPSL-2.0 Imports: 9 Imported by: 1

Documentation

Overview

* Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. * PilotGo licensed under the Mulan Permissive Software License, Version 2. * See LICENSE file for more details. * Author: Wangjunqi123 <wangjunqi@kylinos.cn> * Date: Wed Jun 12 14:00:31 2024 +0800

* Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. * PilotGo licensed under the Mulan Permissive Software License, Version 2. * See LICENSE file for more details. * Author: zhanghan2021 <zhanghan@kylinos.cn> * Date: Wed Sep 27 17:35:12 2023 +0800

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerIsHttp

func ServerIsHttp(rawurl string) (bool, error)

Types

type Params

type Params struct {
	// Header 参数会被添加到请求header当中
	Header map[string]string
	// Form 参数会被格式化到url当中
	Form map[string]string
	// Body 参数会被序列化成json字符串
	Body interface{}
	// Cookit 参数会被添加到请求cookie当中
	Cookie map[string]string
}

type Response

type Response struct {
	// 返回状态码
	StatusCode int
	// 返回body数组,[]byte
	Body []byte
}

func Delete

func Delete(url string, params *Params) (*Response, error)

func Get

func Get(url string, params *Params) (*Response, error)

func Post

func Post(url string, params *Params) (*Response, error)

func Put

func Put(url string, params *Params) (*Response, error)

Jump to

Keyboard shortcuts

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