Adding the InsecureSkipVerify option to a request and new FinalUrl field in the response model. #279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose of Changes
This PR adds the InsecureSkipVerify option to a request and new FinalUrl field in the response model.
InsecureSkipVerify in the option - allows you to dynamically set this flag, as opposed to the static setting in the current implementation.
FinalUrl in the response model - This field is useful when redirection is active. For instance, if we make a request to https://rb.gy/3hwz5h, we will be redirected to the resource https://www.google.com. The FinalUrl field will then contain the final resource, i.e., https://www.google.com.
Implementation
I added the InsecureSkipVerify option. This allows users to bypass SSL certificate verification when making HTTP requests.
I also added the FinalUrl field to the Response structure. This allows users to see the final URL to which a request was redirected.
Testing
I tested the changes by running several test requests and confirmed that FinalUrl and InsecureSkipVerify function correctly.