{"id":24746637,"url":"https://github.com/samuelmarks/curl-simple-https","last_synced_at":"2026-02-15T16:34:00.080Z","repository":{"id":150265234,"uuid":"388686949","full_name":"SamuelMarks/curl-simple-https","owner":"SamuelMarks","description":"Very simple HTTPS interface built atop libcurl","archived":false,"fork":false,"pushed_at":"2022-06-29T21:39:45.000Z","size":110,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T04:38:37.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelMarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2021-07-23T05:24:45.000Z","updated_at":"2023-01-06T16:10:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4ddbc69-6af9-4626-abb6-11d0be907905","html_url":"https://github.com/SamuelMarks/curl-simple-https","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamuelMarks/curl-simple-https","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fcurl-simple-https","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fcurl-simple-https/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fcurl-simple-https/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fcurl-simple-https/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelMarks","download_url":"https://codeload.github.com/SamuelMarks/curl-simple-https/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fcurl-simple-https/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29484656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"last_error":"SSL_read: 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":[],"created_at":"2025-01-28T04:29:44.728Z","updated_at":"2026-02-15T16:34:00.060Z","avatar_url":"https://github.com/SamuelMarks.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"curl-simple-https\n=================\n[![CI for Linux, Windows, macOS](https://github.com/SamuelMarks/curl-simple-https/actions/workflows/linux-Windows-macOS.yml/badge.svg)](https://github.com/SamuelMarks/curl-simple-https/actions/workflows/linux-Windows-macOS.yml)\n[![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nVery simple HTTPS interface built atop libcurl. It's based off a few [examples in libcurl's docs](https://curl.se/libcurl/c/example.html).\n\nHighlights:\n\n  - HTTPS 1.2 enabled\n  - Always get a `struct` with response: https code; curl code; and body\n\n## vcpkg\n\n[`vcpkg`](https://vcpkg.io) is an open-source cross-platform library package management system from [Microsoft](https://microsoft.com); targeting macOS, Linux, and Windows.\n\nIt's very popular, and has strong CMake integration. Henceforth, it is chosen for this project as an example of third-party library integration.\n\n[Install vcpkg](https://vcpkg.io/en/getting-started.html), configure it with your system. Then run:\n\n    [root]/vcpkg/vcpkg install curl\n\nOr do the same with your system package manager, `conan`, or whatever else you use.\n\n## Build\n\n    $ mkdir 'cmake-build-debug' \u0026\u0026 cd \"$_\"\n    $ cmake -DCMAKE_TOOLCHAIN_FILE='[root]/vcpkg/scripts/buildsystems/vcpkg.cmake' \\\n            -DCMAKE_BUILD_TYPE='Debug' \\\n            ..\n    $ cmake --build .\n\n### CLI interface\n\nIf you want to change the CLI options, note that they are generated with `docopt`, use `python -m pip install docopt-c` then:\n```bash\n$ python -m docopt_c \".docopt\" -o \"libcurl-simple-https/curl_simple_https/cli\"\n```\n\n## Usage\nUse [libcurl](https://curl.se/libcurl/c)'s [URL API](https://everything.curl.dev/libcurl/url):\n\n```c\n#include \u003cstdlib.h\u003e\n#include \u003cstdio.h\u003e\n\n#include \u003ccurl/curl.h\u003e\n#include \u003ccurl_simple_https.h\u003e\n\n#define CLIENT_ID \"foo\"\n#define CLIENT_SECRET \"bar\"\n\nint main(void) {\n    CURLU *urlp = curl_url();\n    \n    CURLUcode rc = curl_url_set(urlp, CURLUPART_SCHEME, \"https\", 0);\n    rc = curl_url_set(urlp, CURLUPART_HOST, \"oauth2.googleapis.com\", 0);\n    rc = curl_url_set(urlp, CURLUPART_PATH, \"/token\", 0);\n    rc = curl_url_set(urlp, CURLUPART_QUERY, \"grant_type=authorization_code\", 0);\n    rc = curl_url_set(urlp, CURLUPART_QUERY, \"client_id=\" CLIENT_ID, CURLU_APPENDQUERY);\n    rc = curl_url_set(urlp, CURLUPART_QUERY, \"client_secret=\" CLIENT_SECRET, CURLU_APPENDQUERY);\n    if(rc != CURLUE_OK) return EXIT_FAILURE;\n\n    struct ServerResponse response = https_post(\u0026urlp, /* extra headers */ NULL);\n    curl_url_cleanup(urlp);\n    if (response.code == CURLE_OK) {\n        printf(\"status_code: %l\\n# response\\n%s\", response.code, response.body);\n        return EXIT_SUCCESS;\n    } else {\n        fprintf(stderr, \"curl error: %s\\n\", curl_easy_strerror(res));\n        return EXIT_SUCCESS;\n    }\n}\n```\n\n## TODO\n\n  - CTest\n  - CPack\n  - More docs\n  - Headers support (input \u0026 output)\n\n## See also\n\n-  https://github.com/offscale/libacquire\n\n---\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Fcurl-simple-https","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelmarks%2Fcurl-simple-https","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Fcurl-simple-https/lists"}