{"id":14990006,"url":"https://github.com/masroore/curlsharp","last_synced_at":"2025-05-12T06:07:23.145Z","repository":{"id":11705926,"uuid":"14222120","full_name":"masroore/CurlSharp","owner":"masroore","description":"CurlSharp - .Net binding and object-oriented wrapper for libcurl.","archived":false,"fork":false,"pushed_at":"2017-05-02T02:24:25.000Z","size":11552,"stargazers_count":187,"open_issues_count":10,"forks_count":69,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-05-12T06:06:49.716Z","etag":null,"topics":["c-sharp","cookie","curl","curl-commands","curl-functions","curl-library","curl-multi","dot-net","dot-net-client","dotnet","dotnet-framework","dotnet-library","http","http-client","http2","httpclient","libcurl","network","transfer-data","transfer-files"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masroore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-08T02:34:44.000Z","updated_at":"2025-04-29T14:26:44.000Z","dependencies_parsed_at":"2022-09-04T18:11:16.975Z","dependency_job_id":null,"html_url":"https://github.com/masroore/CurlSharp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masroore%2FCurlSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masroore%2FCurlSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masroore%2FCurlSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masroore%2FCurlSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masroore","download_url":"https://codeload.github.com/masroore/CurlSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253685222,"owners_count":21947306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["c-sharp","cookie","curl","curl-commands","curl-functions","curl-library","curl-multi","dot-net","dot-net-client","dotnet","dotnet-framework","dotnet-library","http","http-client","http2","httpclient","libcurl","network","transfer-data","transfer-files"],"created_at":"2024-09-24T14:19:19.285Z","updated_at":"2025-05-12T06:07:23.123Z","avatar_url":"https://github.com/masroore.png","language":"C#","readme":"CurlSharp\n=========\n\nCurlSharp is a .Net binding and object-oriented wrapper for [libcurl](http://curl.haxx.se/libcurl/).\n\nlibcurl is a web-client library that can provide cross-platform .Net applications with an easy way to implement such things as:\n\n- HTTP ( GET / HEAD / PUT / POST / multi-part / form-data )\n- FTP ( upload / download / list / 3rd-party )\n- HTTPS, FTPS, SSL, TLS  ( via OpenSSL or GnuTLS )\n- Proxies, proxy tunneling, cookies, user+password authentication.\n- File transfer resume, byte ranges, multiple asynchronous transfers.\n- and much more...\n\nCurlSharp provides simple get/set properties for libcurl's options and information functions, event-based hooks to libcurl's I/O, status, and progress callbacks, and wraps the c-style file I/O behind simple filename properties. The `CurlEasy` class contains has more than 100 different properties and methods to handle a wide variety of URL transfer requirements. While this may seem overwhelming at first glance, the good news is you will probably need only a tiny subset of these for most situations.\n\nThe CurlSharp library consists of these parts:\n\n- Pure C# P/Invoke bindings to the libcurl API.\n- Optional libcurlshim helper DLL [WIN32].\n- The `CurlEasy` class which provides a wrapper around a `curl_easy` session.\n- The `CurlMulti` class, which serves as a container for multiple CurlEasy objects, and provides a wrapper around a `curl_multi` session.\n- The `CurlShare` class which provides an infrastructure for serializing access to data shared by multiple `CurlEasy` objects, including cookie data and DNS hosts. It implements the `curl_share_xxx` API. \n- The `CurlHttpMultiPartForm` to easily construct multi-part forms.\n- The `CurlSlist` class which wraps a linked list of strings used in cURL.\n\nCurlSharp is available for these platforms:\n\n- [Stable] Windows 32-bit\n- [Experimental] Win64 port\n- [Experimental] Mono Linux \u0026 OS X support\n\n#### Examples ####\n\nA simple HTTP download program...\n\n```c#\nusing System;\nusing CurlSharp;\n\ninternal class EasyGet\n{\n  public static void Main(String[] args)\n  {\n    Curl.GlobalInit(CurlInitFlag.All);\n\n    try\n    {\n      using (var easy = new CurlEasy())\n      {\n        easy.Url = \"http://www.google.com/\";\n        easy.WriteFunction = OnWriteData;\n        easy.Perform();\n      }\n    }\n    finally\n    {\n      Curl.GlobalCleanup();\n    }\t\n  }\n\n  public static Int32 OnWriteData(byte[] buf, Int32 size, Int32 nmemb, object data)\n  {\n      Console.Write(Encoding.UTF8.GetString(buf));\n      return size*nmemb;\n  }\n}\n```\n\nSimple HTTP Post example:\n\n```c#\nusing (var easy = new CurlEasy())\n{\n    easy.Url = \"http://hostname/testpost.php\";\n    easy.Post = true;\n    var postData = \"parm1=12345\u0026parm2=Hello+world%21\";\n    easy.PostFields = postData;\n    easy.PostFieldSize = postData.Length;\n    easy.Perform();\n}\n```\n\nHTTP/2.0 download:\n\n```c#\n\nusing (var easy = new CurlEasy())\n{\n    easy.Url = \"https://google.com/\";\n    easy.WriteFunction = OnWriteData;\n\n    // HTTP/2 please\n    easy.HttpVersion = CurlHttpVersion.Http2_0;\n\n    // skip SSL verification during debugging\n    easy.SslVerifyPeer = false;\n    easy.SslVerifyhost = false;\n\n    easy.Perform();\n}\n```\n\nMore samples are included in the Samples folder.\n\n#### Credits ####\n\nCurlSharp Written by Dr. Masroor Ehsan.\n\nCurlSharp is based on original code by Jeff Phillips [libcurl.NET](http://sourceforge.net/projects/libcurl-net/). Original code has been modified and greatly enhanced.\n\n----------\n\nCurlSharp Copyright © 2013-17 Dr. Masroor Ehsan","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasroore%2Fcurlsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasroore%2Fcurlsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasroore%2Fcurlsharp/lists"}