CosmosHTTP is a HTTP client made in C# for the Cosmos operating system construction kit. GET and PUT are currently supported.
See this issue for todo list.
Install the Nuget Package from Nuget:
Install-Package CosmosHttp -Version 1.0.4
dotnet add PROJECT package CosmosHttp --version 1.0.4
Or add these lines to your Cosmos kernel .csproj:
<ItemGroup>
<PackageReference Include="CosmosHttp" Version="1.0.4" />
</ItemGroup>
using CosmosHttp.Client;
HttpRequest request = new();
request.IP = "34.223.124.45";
request.Domain = "neverssl.com"; //very useful for subdomains on same IP
request.Path = "/";
request.Method = "GET";
request.Send();
Console.WriteLine(request.Response.Content); // or to get bytes Encoding.ASCII.getString(request.Response.GetStream())
Here is a basic wget command implementation using CosmosHttp: github.com/aura-systems/Aura-Operating-System.
👤 @2881099
Contributions, issues and feature requests are welcome! Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2023 CosmosOS. This project is BSD Clause 3 licensed.