requestbin

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequestBinKey

func GetRequestBinKey(id string) string

GetRequestBinKey request bin key

Types

type API

type API struct{}

API request bin

func (API) CreateRequestBin

func (API) CreateRequestBin(c *gin.Context)

CreateRequestBin /api/request-bin/Create @Summary Receive and visualize HTTP requests for any method. @Description Receive and visualize HTTP requests for any method. @Tags Web-Utils @Accept json @Produce json,xml @Param "" body CreateBinRequest true "Request JSON" @Success 200 {object} data.APIResponse @Failure 400 {object} data.APIResponse @Router /api/request-bin/Create [post]

func (API) RequestIn

func (API) RequestIn(c *gin.Context)

RequestIn /api/request-bin/receive/:id @Summary Take any request for request-bin @Description Take any request for request-bin @Tags Web-Utils @Accept json,xml @Produce json,xml @Param "" body object true "Any kind of request" @Param id path int true "id from create request" @Success 200 {object} data.APIResponse @Failure 400 {object} data.APIResponse @Router /api/request-bin/receive/{id} [post]

type BinData

type BinData struct {
	ID              string
	URL             string
	VerificationKey string
	History         []*History
}

BinData page data /app/request-bin

func GetRequestBinHistory

func GetRequestBinHistory(id string) *BinData

GetRequestBinHistory get request history by id

func LoadRequestBinData

func LoadRequestBinData(c *gin.Context) *BinData

LoadRequestBinData load request bin data

type CreateBinRequest

type CreateBinRequest struct {
	IsPrivate bool `json:"isPrivate" xml:"isPrivate" form:"isPrivate"`
}

CreateBinRequest /api/request-bin/create

type CreateBinResponse

type CreateBinResponse struct {
	ID              string
	VerificationKey string
}

CreateBinResponse response

type History

type History struct {
	Method              string
	TimeReceived        time.Time
	Proto               string
	RemoteAddr          string
	QueryStrings        string
	Headers             map[string]string
	Cookies             []string
	Forms               map[string]string
	MultipartFormsFiles map[string]string
	Body                string
}

History request history

Jump to

Keyboard shortcuts

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