 
 
 	requestCallback = requestCallback || ->
-	# Create mock endpoint to forward requests to
+		# Create mock endpoint to forward requests to
 	mockServer = https.createServer options, (req, res) ->
 		res.writeHead resStatusCode, {"Content-Type": "text/plain"}
 		res.end "Secured " + resBody


exports.createMockServer = (resStatusCode, resBody, port, callback, requestCallback) ->
	requestCallback = requestCallback || ->
	# Create mock endpoint to forward requests to
	mockServer = http.createServer (req, res) ->
		res.writeHead resStatusCode, {"Content-Type": "text/plain"}
		res.end resBody

exports.createMockServerForPost = (successStatusCode, errStatusCode, bodyToMatch) ->
	return http.createServer (req, res) ->
		req.on "data", (chunk) ->
			if chunk.toString() == bodyToMatch
				res.writeHead successStatusCode, {"Content-Type": "text/plain"}
				res.end()
			else
				res.writeHead errStatusCode, {"Content-Type": "text/plain"}
				res.end()

