Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instead of using http.CanonicalHeaderKey to check if a header exists,, you can directly use the response.Header.Get(header) method. #62

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 30, 2024

  1. Instead of using http.CanonicalHeaderKey to check if a header exist…

    …s,, you can directly use the `response.Header.Get(header)` method.
    
    So instead of using `validateResponseHeaderPatterns` function, instead of using `http.CanonicalHeaderKey` to check if a header exists, you can directly use the `response.Header.Get(header)` method. It automatically handles case-insensitive header names.
    
    Use a switch statement instead of multiple if conditions for validating the HTTP method in the `preProcessTest` function. It will be more concise and easier to read.
    
    Extract the header validation logic from validateResponseHeaders into separate functions for each type of assertion (patterns, `notMatching`, `notPresent`, `ifPresentNotMatching`). 
    
    This will make the code more modular and easier to understand.
    Montana authored May 30, 2024
    Configuration menu
    Copy the full SHA
    79e0cbd View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2024

  1. Configuration menu
    Copy the full SHA
    b78c4ae View commit details
    Browse the repository at this point in the history