methods

package
v0.21.201 Latest Latest
Warning

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

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

Documentation

Overview

Package methods implements a custom predicate to match routes based on the http method in request

It supports multiple http methods, with case insensitive input

Examples:

// matches GET request
example1: Methods("GET") -> "http://example.org";

// matches GET or POST request
example1: Methods("GET", "post") -> "http://example.org";

Index

Constants

Name is the predicate name Deprecated, use predicates.MethodsName instead

Variables

View Source
var ErrInvalidArgumentType = errors.New("only string values are allowed")
View Source
var ErrInvalidArgumentsCount = errors.New("at least one method should be specified")

Functions

func New

func New() routing.PredicateSpec

New creates a new Methods predicate specification

Types

This section is empty.

Jump to

Keyboard shortcuts

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