http

package
v2.3.0-beta18 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package http for http matching

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsMatch

func AbsMatch(tcs1, tcs2 *models.TestCase, noiseConfig map[string]map[string][]string, ignoreOrdering bool, logger *zap.Logger) (bool, bool, bool, *models.AbsResult)

AbsMatch (Absolute Match) compares two test cases and returns a boolean value indicating whether they are equal or not. It also returns a AbsResult object which contains the results of the comparison. Parameters: tcs1, tcs2, noiseConfig, ignoreOrdering, logger Returns: bool, *models.AbsResult

func CompareCurl

func CompareCurl(curl1, curl2 string, logger *zap.Logger) bool

func CompareHTTPReq

func CompareHTTPReq(tcs1, tcs2 *models.TestCase, _ models.GlobalNoise, ignoreOrdering bool, logger *zap.Logger) (bool, models.ReqCompare)

CompareHTTPReq compares two http requests and returns a boolean value indicating whether they are equal or not.

func CompareHTTPResp

func CompareHTTPResp(tcs1, tcs2 *models.TestCase, noiseConfig models.GlobalNoise, ignoreOrdering bool, logger *zap.Logger) (bool, models.RespCompare)

CompareHTTPResp compares two http responses and returns a boolean value indicating whether they are equal or not.

func CompareNoise

func CompareNoise(noise1, noise2 map[string][]string) bool

func CompareURLParams

func CompareURLParams(urlParams1, urlParams2 map[string]string, urlParamsResult *[]models.URLParamsResult) bool

func FlattenHTTPResponse

func FlattenHTTPResponse(h http.Header, body string) (map[string][]string, error)

func Match

func Match(tc *models.TestCase, actualResponse *models.HTTPResp, noiseConfig map[string]map[string][]string, ignoreOrdering bool, logger *zap.Logger) (bool, *models.Result)

Types

This section is empty.

Jump to

Keyboard shortcuts

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