Class: DevSuite::RequestBuilder::Tool::Validator::Curl
- Inherits:
-
Utils::Construct::Component::Validator::Base
- Object
- Utils::Construct::Component::Validator::Base
- DevSuite::RequestBuilder::Tool::Validator::Curl
- Defined in:
- lib/dev_suite/request_builder/tool/validator/curl.rb
Constant Summary collapse
- VALID_HTTP_METHODS =
["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].freeze
Instance Method Summary collapse
Methods included from Utils::Construct::Component::Validator::ValidationRule
#validate_array_of_type!, #validate_hash!, #validate_inclusion!, #validate_non_empty_string!, #validate_presence!, #validate_range!, #validate_type!, #validate_url!
Instance Method Details
#validate!(http_method:, url:, headers:, body: nil) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/dev_suite/request_builder/tool/validator/curl.rb', line 10 def validate!(http_method:, url:, headers:, body: nil) validate_http_method(http_method) validate_url(url) validate_headers(headers) validate_body(body) end |