diff --git a/samples/client-side-endpoint.php b/samples/client-side-endpoint.php deleted file mode 100644 index cef446f..0000000 --- a/samples/client-side-endpoint.php +++ /dev/null @@ -1,21 +0,0 @@ -statusCode = 200; -$resp->setHeader('Content-Type', 'text/plain'); -$resp->setHeader('User-Agent', 'Well RESTed'); -$resp->body = 'The test works!'; -$resp->respond(); -exit; - -?> diff --git a/samples/client-side-request-and-response.php b/samples/client-side-request-and-response.php index fe87c51..1940753 100644 --- a/samples/client-side-request-and-response.php +++ b/samples/client-side-request-and-response.php @@ -18,7 +18,7 @@ $rqst = new \wellrested\Request(); // Use the client-site-endpoint.php script $rqst->hostname = $_SERVER['HTTP_HOST']; -$rqst->path = '/wellrested/samples/client-side-endpoint.php'; +$rqst->path = '/wellrested/samples/server-side-response.php'; // Issue the request, and read the response returned by the server. try { diff --git a/samples/client-side-simple-request.php b/samples/client-side-request.php similarity index 100% rename from samples/client-side-simple-request.php rename to samples/client-side-request.php diff --git a/samples/server-side-response.php b/samples/server-side-response.php new file mode 100644 index 0000000..e4964a1 --- /dev/null +++ b/samples/server-side-response.php @@ -0,0 +1,17 @@ +statusCode = 200; +$resp->setHeader('Content-Type', 'text/plain'); +$resp->body = 'This is a response.'; +$resp->respond(); +exit; + +?>