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

Support for proxies and CLI applications #51

Closed jlubeck closed 3 years ago

jlubeck commented 3 years ago

Basically what the title says. Simple changes, which expand the possibilities of the package.

jlubeck commented 3 years ago

It looks like that decorator is coming from flutter/foundation. And that import is not possible to use on CLI applications. And since that is that just a decorator (you still had the asserts there) I see no harm in removing that if it allows support for CLI apps. Hopefully you agree!

On Jan 9, 2021, at 9:10 AM, Alejandro Ulate notifications@github.com wrote:

 @CodingAleCR commented on this pull request.

In lib/models/request_data.dart:

@@ -14,8 +13,8 @@ class RequestData { Encoding encoding;

RequestData({

  • @required this.method,
  • @required this.baseUrl, Nice job, just a question, why did you remove the @required decorator here?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

CodingAleCR commented 3 years ago

Yes, it definitely should not be flutter foundation import. I probably missed it when I changed the different @required decorators to be from the meta plugin. This plugin allows you to work with CLI applications. I'll add it it the future since as you said there's not much of a difference in terms of functionality, it's more of a semantics issue.

Thanks and great work!