A Dart package that provides a Curl class for parsing and formatting cURL commands.
- 
Add the package to your pubspec.yamlfile
- 
Use the package: 
import 'package:curl_converter/curl_converter.dart';
void main() {
  // Parse a cURL command
  final curlString = 'curl -X GET https://www.example.com/';
  final curl = Curl.parse(curlString);
  
  // Access parsed data
  print(curl.method); // GET
  print(curl.uri); // https://www.example.com/
  // Format Curl object to a cURL command
  final formattedCurlString = curl.toCurlString();
  print(formattedCurlString); // curl -X GET https://www.example.com/
}See test folder for more example usages.
- Parse a cURL command into a Curlclass instance.
- Format a Curlobject back into a cURL command.
- Supports various options such as request method, headers, data, cookies, user-agent, and more.
$ dart pub publish --dry-run
Contributions are welcome! Please create an issue or make a fork and propose a PR to contribute to this project.
This project is a fork of utopicnarwhal/curl_converter which was licensed under the Apache License 2.0.