diff --git a/README.md b/README.md index 70d30f0..2d68022 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ This request pre-processor adds request validation for an API written in the Ref Write safer Reflect endpoints by enforcing request data structure validation before the request reaches your endpoint's logic. This plugin validates GET and POST data (even JSON) and returns an array with scoped `Error`s that can be further acted upon if desired. -*Example:* +## Example ``` -GET Request: /my-endpoint?key1=lorem-ipsum&key2=dolor +POST Request: /my-endpoint?key1=lorem-ipsum&key2=dolor POST Body: {"key3":15, "key4":["hello", "world"]} ``` ```php @@ -16,7 +16,7 @@ use \ReflectRules\Type; use \ReflectRules\Rules; use \ReflectRules\Ruleset; -class GET_MyEndpoint implements Endpoint { +class POST_MyEndpoint implements Endpoint { private Ruleset $rules; public function __construct() {