curl_generator 1.0.2 copy "curl_generator: ^1.0.2" to clipboard
curl_generator: ^1.0.2 copied to clipboard

A Dart package to create simple curl (bash) with params, headers and body.

example/lib/example.dart

import 'package:curl_generator/curl_generator.dart';

void initTest() {
  const url = 'https://some.api.com/some/path';
  const params = {
    'some': 'some',
    'params': 'params',
  };
  const header = {
    'some': 'some',
    'header': 'header',
  };
  const body = {
    'some': 'some',
    'body': 'body',
    'value': 123,
    'innerObject': {
      'some': 'some',
      'inner': false,
      'value': 2.5,
    },
  };
  final curl = Curl.curlOf(
    url: url,
    body: body,
    header: header,
    queryParams: params,
  );

  print(curl);
}
6
likes
160
points
179
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package to create simple curl (bash) with params, headers and body.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on curl_generator