Learn R Programming

scenes (version 0.1.0)

req_uses_method: Switch Scenes on Method

Description

Create a scene_action specifying the HTTP method that must be used (or not used).

Usage

req_uses_method(method, negate = FALSE)

req_uses_get(negate = FALSE)

req_uses_post(negate = FALSE)

Value

A scene_action object, to be used in set_scene().

Arguments

method

The expected HTTP method.

negate

If TRUE, trigger the corresponding scene when this action is not matched.

Examples

Run this code
req_uses_method("GET")
req_uses_method("POST")
req_uses_get()
req_uses_get(negate = TRUE)
req_uses_post()
req_uses_post(negate = TRUE)

Run the code above in your browser using DataLab