curl_converter 1.0.4 copy "curl_converter: ^1.0.4" to clipboard
curl_converter: ^1.0.4 copied to clipboard

A Dart package for effortless conversion between cURL commands and Dart class.

example/curl_converter_example.dart

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 "https://www.example.com/""
}
1
likes
150
points
348
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package for effortless conversion between cURL commands and Dart class.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

args, equatable

More

Packages that depend on curl_converter