Parametrize (http) method.
See original GitHub issueI want to make sure that my API rejects certain http methods:
---
marks:
- parametrize:
key: http_method
vals:
- POST
- PUT
- DELETE
- PATCH
test_name: No writes allowed to user endpoint
stages:
- name: try {http_method}
request:
url: http://localhost/o/user/
method: "{http_method}"
headers:
content-type: application/json
authorization: "Bearer xyz1234abcd"
response:
status_code: 405
it fails with:
pykwalify.errors.SchemaError: <SchemaError: error code 2: Schema validation failed:
- Enum '{http_method}' does not exist. Path: '/stages/0/request/method'.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Is there a way to parameterize the HTTP method when using ...
I'm using HttpClient in .Net core 3.1. Most of my requests follow a similar pattern regardless of the HTTP method used: build URL;...
Read more >How to Parameterize URL for HTTP Transformation - YouTube
This video explains how to parameterize URL for HTTP Transformation. This is a new feature available in 10.4 onwards where you can ...
Read more >REST API Design Best Practices for Parameter and Query ...
Generally speaking, parametrization is a kind of request configuration. In a programming language, we can request a return value from a function ......
Read more >Parameterized URL Method - IBM
The parameterized URL method performs tasks or starts specific components using parameters typed in the Web browser address bar.
Read more >Defining a new HTTP method: HTTP SEARCH
HTTP SEARCH is a new HTTP method, for safe requests that include a request… ... GET requests can be parameterized by their URL,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this feature has enormous potential - a lot of APIs have a lot of combinations (parameter x,y set to A,b , do X,Z also work) and simply listing them would be so helpful.
Completely agree with you @cleder - it’s not a usecase we’ve got covered very well. I will have a look and see about getting this in to the syntax.