network_request 0.3.1 copy "network_request: ^0.3.1" to clipboard
network_request: ^0.3.1 copied to clipboard

A powerful and comprehensive Dart package for simplifying HTTP requests and interacting with RESTful APIs

0.3.1 #

  • Updated dependencies to their latest versions:
    • http ^1.5.0^1.6.0
    • lints ^6.0.0^6.1.0
    • test ^1.26.2^1.31.2
  • Raised the Dart SDK constraint to ^3.4.0 to match http 1.6.0.
  • JSON requests no longer get an implicit charset=utf-8 on Content-Type (http 1.6.0 / RFC 8259).
  • Renamed helper test files so dart test only loads suites that define main.
  • Error logs only mention a key/type mismatch when decoding fails (DecodingError). Other errors still include the response body when available.

0.3.0 #

Breaking Change #

  • The Request that triggered the Re-authenticate flow passed in tryToReauthenticate to make better decision
    • How to resolve:
      Previously, you may have implemented.
      @override
      Future<bool> tryToReauthenticate({dynamic client}) async {
        // ... your logic
      }
      
      Now, update your method to:
      @override
      Future<bool> tryToReauthenticate({required Request request, dynamic client}) async {
         // ... your logic
      }
      

0.2.2 #

  • Request headers override auth header
  • Status code added in error logs if available

0.2.1 #

  • Correct Error logs

0.2.0 #

  • Made Decoding Error more explanatory with stack trace
  • Added support for aborting requests. Introduced in http >= 1.5.0

0.1.1 #

  • Made wasm compatible

0.1.0 #

New Features #

  • Successful response status codes made customizable. Defaults to 200-299.
  • More information given to decodeError.
  • Examples improved

Breaking Change #

  • Typo correction: The property unautherizedStatusCode has been renamed to unauthorizedStatusCode.

    • Action required: If you have overridden this property in your custom NetworkRequest subclasses, update your code to use the new name. If not, no changes are needed.
  • headers field in NetworkRequest made private to avoid any unintended behaviour. It is no longer accessible for subclasses.

  • decodeError parameters have changed to send CapturedResponse instead of dynamic.

    • How to resolve:
      Previously, you may have implemented.
      Exception? errorDecoder(dynamic data) {
         // ...your logic here
      }
      
      Now, update your method to:
      Exception? errorDecoder(CapturedResponse response) {
          var data = response.body;
          // ...your logic here
      }
      
      This change gives you access to the full response object, so use response.body to access the data as before.

0.0.4+1 #

  • Readme updated to highlight the call method & Customizability NetworkRequest of explained

0.0.4 #

  • Download and Upload progress callback added

0.0.3+2 #

  • Topics added in description.

0.0.3+1 #

  • Readme updated.

0.0.3 #

  • http updated to 1.4.0.
  • Readme updated.

0.0.2 #

  • Readme updated.

0.0.1 #

  • Initial version.
0
likes
160
points
100
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A powerful and comprehensive Dart package for simplifying HTTP requests and interacting with RESTful APIs

Repository (GitHub)
View/report issues

Topics

#http #network #rest #logging #curl

License

MIT (license)

Dependencies

collection, http

More

Packages that depend on network_request