curl_logger_dio_interceptor
在終端機中將您的 HTTP 請求列印為 curl 命令。輕鬆與同事分享,並匯入 Postman!
OwnWeb/curl_logger_dio_interceptor open-source repository details.
^5.1.1^1.0.4以下為英文專案原文快照,最新內容請造訪 GitHub。
A Flutter curl-command generator for Dio.
curl_logger_dio_interceptor log output
Easily test your Flutter-made requests in your favorite terminal or even in Postman or Insomnia.
Sometimes you want to replay the HTTP requests made in your app, or you want to share it with your beloved backend developer. Or you just love CURL.
Use your app as you want, and when the broken-request comes, look at your terminal, copy and paste it, and enjoy replaying it easily!
_dio = Dio();
_dio.interceptors.add(CurlLoggerDioInterceptor());
Depending on your needs, you can also pass printOnSuccess: true to print all requests instead of
only errored ones.
By default, convertFormData is true and converts FormData to plain Map so we can get a CURL
representation even while using FormData (as for file uploads).