On this page:
redirect-to
redirection-status?
permanently
temporarily
see-other
with-errors-to-browser
Version: 4.1.2

2.7 Helpers

 (require web-server/servlet/helpers)

"servlet/helpers.ss" provides functions built on "servlet/web.ss" that are useful in many servlets.

(redirect-to uri    
  [perm/temp    
  #:headers headers])  response?
  uri : string?
  perm/temp : redirection-status? = temporarily
  headers : (listof header?) = (list)

Generates an HTTP response that redirects the browser to uri, while including the headers in the response.

(redirection-status? v)  boolean?
  v : any/c

Determines if v is one of the following values.

permanently : redirection-status?

A redirection-status? for permanent redirections.

temporarily : redirection-status?

A redirection-status? for temporary redirections.

see-other : redirection-status?

A redirection-status? for "see-other" redirections.

(with-errors-to-browser send/finish-or-back    
  thunk)  any
  send/finish-or-back : (response? . -> . void?)
  thunk : (-> any)

Calls thunk with an exception handler that generates an HTML error page and calls send/finish-or-back.