Skip to content

Commit

Permalink
more wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Sep 18, 2024
1 parent 2b9f6a4 commit 625ba02
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
7 changes: 7 additions & 0 deletions src/main/bx/bifs/GetMockServer.bx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ class{
/**
* Creates a new mock server and store it in the request context
* If it exists already, it will return the existing one
*
* @webroot string The webroot to use for the mock server, defaults to the module setting
* @host string The host to use for the mock server, defaults to the module setting
* @port numeric The port to use for the mock server, defaults to the module setting
* @secure boolean Whether the mock server should be secure, defaults to the module setting
* @force boolean Whether to force the creation of a new mock server
*
* @return MockHTTPExchange
*/
function invoke(
Expand Down
24 changes: 16 additions & 8 deletions src/main/bx/bifs/StartMockRequest.bx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,25 @@ class{

/**
* Handle the start of a mock request
*
* @requestPath The request path to mock. Defaults to /
* @webroot The webroot of the application. Defaults to the module setting
* @host The host to mock. Defaults to the module setting
* @port The port to mock. Defaults to the module setting
* @secure The secure flag to mock. Defaults to the module setting
* @force Force the creation of a new mock server. Defaults to false
*/
function invoke(
string requestPath = "/",
// Request Settings
string path = "/",
string method = "GET",
string pathInfo = "",
string queryString = "",
string contentType = "text/html",
string body = "",
struct urlScope = {},
struct formScope = {},
struct cookieScope = {},
struct headers = {},
// Response Mock Settings
numeric responseStatus = 200,
string responseContentType = "text/html",
string responseBody = "",
struct responseHeaders = {},
// Web Server Settings
string webroot,
string host,
numeric port,
Expand Down

0 comments on commit 625ba02

Please sign in to comment.