Learn R Programming

webmockr (version 0.1.0)

MethodPattern: MethodPattern

Description

MethodPattern

Arguments

pattern
(character) a HTTP method, lowercase

Details

Methods
matches(method)
An HTTP method - method (character)

Matches regardless of case. e.g., POST will match to post

Examples

Run this code
(x <- MethodPattern$new(pattern = "post"))
x$pattern
x$matches(method = "post")
x$matches(method = "POST")

Run the code above in your browser using DataLab