CodingAleCR / http_interceptor

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.
MIT License
134 stars 67 forks source link

Allow uri without scheme #49

Closed hjJunior closed 3 years ago

hjJunior commented 3 years ago

One of the usages that we needed for our project depends on an interceptor to set baseUrl that is a configured server by the user, but when we try to access request.url.origin for URL that doesn't contain the scheme (HTTP/HTTPS) will throw before getting into the interceptor.

The solution proposed: Identify if the current URL has scheme before accessing it

CodingAleCR commented 3 years ago

Hi thanks for the pull request, collaboration is always welcomed and encouraged🥳🎉, I'll dive into this during the week, I do have a couple of concerns but want to review in detail with my laptop on hand.

For the moment, I'd like it if you could remove the pubspec.lock files from the PR as they involve null safety changes that the library does not support yet, I'll get back to you as soon as I solve my doubts by running a couple of tests. Thanks again and Happy Holidays!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.