print.route: Printing Routes and Mockups

Description Usage Arguments See Also Examples

Description

Prints a route or mockup. Printing a mockup prints the underlying route.

Usage

1
2
3
4
5
## S3 method for class 'route'
print(x, ...)

## S3 method for class 'route'
format(x, ...)

Arguments

x

A route or route mockup.

...

Ignored.

See Also

route, mockup

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
route(
  c('GET', 'POST'),
  '^path$',
  function(req) {
    response()
  }
)

route(
  'put',
  '^another/path$',
  function(req) {
    response()
  }
)

nteetor/prairie documentation built on May 24, 2019, 9:56 a.m.