Class haproxy.embed.Response

HTTP response

Functions

Response.new ([status_code=200[, body=''[, headers={}]]]) Construct an API response.
Response:render (applet) Render and serve an API response.


Functions

Response.new ([status_code=200[, body=''[, headers={}]]])
Construct an API response.

Parameters:

  • status_code int HTTP status code (default 200)
  • body string response body (default '')
  • headers table response headers (default {})

See also:

Usage:

    response = Response(http.status.OK, 'Hello world!', {})
Response:render (applet)
Render and serve an API response.

Parameters:

  • applet the HAProxy applet context
generated by LDoc 1.4.3 Last updated 2016-06-26 17:50:20