rhttp_curl_logger 0.0.2
rhttp_curl_logger: ^0.0.2 copied to clipboard
An interceptor for rhttp that prints the request as a single line cURL command
rhttp_curl_logger #
A lightweight logger for the rhttp
package that prints requests as cURL
commands to your console for easy debugging and sharing.
π¦ Installation #
Add the package to your pubspec.yaml
:
dev_dependencies:
rhttp_curl_logger: ^0.0.2
π Usage #
Use the RhttpCurlLogger
interceptor in your rhttp
client:
import 'package:rhttp_curl_logger/rhttp_curl_logger.dart';
final client = await RhttpClient.create(
interceptors: [
RhttpCurlLogger(
useDoubleQuotes: true, // default
escapeQuotesInBody: true, // default
multiline: false, // default
logName: 'curl_log', // default
logger: null, // default
),
],
);