{"id":26674108,"url":"https://github.com/lkrjangid1/curl_request_parser","last_synced_at":"2026-04-28T13:35:41.404Z","repository":{"id":284273791,"uuid":"954412665","full_name":"lkrjangid1/curl_request_parser","owner":"lkrjangid1","description":"A Dart package for parsing curl commands into structured requests and generating Dart HTTP code.","archived":false,"fork":false,"pushed_at":"2025-03-25T04:44:26.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-10T11:11:03.688Z","etag":null,"topics":["curl","dart","pub-dev"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/curl_request_parser","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkrjangid1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-25T03:32:57.000Z","updated_at":"2025-03-25T04:44:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8bdfc6f-abb2-46a8-9b47-7f0a8802eeba","html_url":"https://github.com/lkrjangid1/curl_request_parser","commit_stats":null,"previous_names":["lkrjangid1/curl_request_parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lkrjangid1/curl_request_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkrjangid1%2Fcurl_request_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkrjangid1%2Fcurl_request_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkrjangid1%2Fcurl_request_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkrjangid1%2Fcurl_request_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkrjangid1","download_url":"https://codeload.github.com/lkrjangid1/curl_request_parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkrjangid1%2Fcurl_request_parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32383535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curl","dart","pub-dev"],"created_at":"2025-03-26T02:17:28.573Z","updated_at":"2026-04-28T13:35:41.398Z","avatar_url":"https://github.com/lkrjangid1.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Curl Parser for Dart\n\nA comprehensive Dart package for parsing curl commands into structured request objects and generating Dart HTTP code.\n\n## Features\n\n- Parse curl command strings into structured `CurlRequest` objects\n- Support for all major curl options (200+ options)\n- Convert parsed requests to JSON for storage or manipulation\n- Generate Dart code using the `http` package to reproduce the curl request\n- Handle various authentication methods, headers, data formats, and more\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  curl_request_parser: any\n```\n\nThen run:\n\n```\ndart pub get\n```\n\n## Usage\n\n### Basic parsing\n\n```dart\nimport 'package:curl_request_parser/curl_request_parser.dart';\n\nvoid main() {\n  final curlCommand = 'curl -X POST \"https://api.example.com/data\" -H \"Content-Type: application/json\" -d \\'{\"name\":\"John\"}\\'';\n  final request = CurlParser.parse(curlCommand);\n  \n  print('URL: ${request.url}');\n  print('Method: ${request.method}');\n  print('Headers: ${request.headers}');\n  print('Data: ${request.data}');\n}\n```\n\n### Generate Dart HTTP code\n\n```dart\nimport 'package:curl_request_parser/curl_request_parser.dart';\n\nvoid main() {\n  final curlCommand = 'curl -X POST \"https://api.example.com/data\" -H \"Content-Type: application/json\" -d \\'{\"name\":\"John\"}\\'';\n  final request = CurlParser.parse(curlCommand);\n  \n  // Generate Dart code that reproduces this curl request\n  final dartCode = request.toDartHttpRequest();\n  print(dartCode);\n}\n```\n\n### Convert to JSON\n\n```dart\nimport 'package:curl_request_parser/curl_request_parser.dart';\n\nvoid main() {\n  final curlCommand = 'curl -X POST \"https://api.example.com/data\" -H \"Content-Type: application/json\" -d \\'{\"name\":\"John\"}\\'';\n  final request = CurlParser.parse(curlCommand);\n  \n  // Convert to JSON for storage or transmission\n  final json = request.toJson();\n  print(json);\n}\n```\n\n## Supported Options\n\nThis package supports a comprehensive set of curl options, including:\n\n- HTTP methods (`-X`, `--request`)\n- Headers (`-H`, `--header`)\n- Data options (`-d`, `--data`, `--data-binary`, etc.)\n- Form data (`-F`, `--form`)\n- Authentication (`-u`, `--user`, `--oauth2-bearer`, etc.)\n- SSL/TLS options (`--cacert`, `--cert`, `--key`, etc.)\n- Connection options (`--connect-timeout`, `--max-time`, etc.)\n- Proxy options (`-x`, `--proxy`, etc.)\n- HTTP protocol options (`--http1.1`, `--http2`, etc.)\n- And many more!\n\nFor a complete list of supported options, refer to the [API documentation](#).\n\n## Example: Parsing Complex Curl Commands\n\n```dart\nfinal complexCurl = '''\ncurl -v -X PUT 'https://api.example.com/files/upload' \\\\\n-H 'Content-Type: application/octet-stream' \\\\\n-H 'Authorization: Bearer token123' \\\\\n--connect-timeout 30 \\\\\n--max-time 60 \\\\\n--retry 3 \\\\\n--compressed \\\\\n-k \\\\\n-T './data.bin' \\\\\n-o './response.json'\n''';\n\nfinal request = CurlParser.parse(complexCurl);\nprint(request);\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkrjangid1%2Fcurl_request_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkrjangid1%2Fcurl_request_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkrjangid1%2Fcurl_request_parser/lists"}