HTTP Testing Methods
request()
/**
* Shortcut method to making a request through the framework.
*
* @route The route to execute.
* @params Params to pass to the `rc` scope.
* @headers Custom headers to pass as from the request
* @method The method type to execute. Defaults to GET.
* @renderResults If true, then it will try to do the normal rendering procedures and store the rendered content in the RC as cbox_rendered_content
* @withExceptionHandling If true, then ColdBox will process any errors through the exception handling framework instead of just throwing the error. Default: false.
* @domain Override the domain of execution of the request. Default is to use the cgi.server_name variable.
*/
function request(
string route = "",
struct params = {},
struct headers = {},
string method = "GET",
boolean renderResults = true,
boolean withExceptionHandling = false,
domain = cgi.SERVER_NAME
)get()
post()
put()
patch()
delete()
Examples
Was this helpful?