8000 Added refit setting to bypass url verification by mjfara · Pull Request #1113 · reactiveui/refit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added refit setting to bypass url verification #1113

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

Closed
wants to merge 5 commits into from

Conversation

mjfara
Copy link
@mjfara mjfara commented Mar 10, 2021

Feature
Added a new Refit Setting to allow bypassing of Url verification, specifically for use in a generic class for the Microsoft Dynamics Web API which uses OData.

What is the current behavior?
The current behavior enforces the url verification:

VerifyUrlPathIsSane(RelativePath);

static void VerifyUrlPathIsSane(string relativePath)
        {
            if (relativePath == "")
                return;

            if (!relativePath.StartsWith("/"))
                throw new ArgumentException($"URL path {relativePath} must start with '/' and be of the form '/foo/bar/baz'");
        }

What is the new behavior?
The new behavior adds an option to bypass this check:

if(refitSettings?.BypassUrlVerification != true)
                VerifyUrlPathIsSane(RelativePath);

What might this PR break?
This PR should have no effect on anything else, as the default behavior without changing this option is the same.

@mjfara
Copy link
Author
mjfara commented Mar 10, 2021

Issue: #1105

@clairernovotny
Copy link
Member

As mentioned in #1105 (comment), we won't be taking this change at this time. A custom delegating HttpHandler can alter the URL's as needed.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0