Solid.Http
Solid.Http is a library to simplify http calls in C# for .net standard 2.0. It's designed to be async and fully extendable.
Install / Use
/learn @SOLIDSoftworks/Solid.HttpREADME
Archived
This repository has been archived and all relevant code moved to the Solid.Identity repository.
Solid.Http

Solid.Http is a library to simplify http calls in C# for .net standard 2.0. It's designed to be async and fully extendable.
Packages
- Solid.Http.Core
- Solid.Http.Json
- Solid.Http
- This package is a shortcut for adding Solid.Http.Core and Solid.Http.Json.
- Solid.Http.NewtonsoftJson
- Solid.Http.Zip
- Solid.Http.Xml
Basic usage
The basic package is Solid.Http which includes Solid.Http.Core and Solid.Http.Json.
> dotnet add package Solid.Http
Initialization
Adding Solid.Http is quite simple when you just need the fluent interface and JSON.
public void ConfigureServices(IServiceCollection services)
{
services.AddSolidHttp();
}
Global event handlers
You can also register event handlers during initialization.
public void ConfigureServices(IServiceCollection services)
{
services
.AddSolidHttp(builder =>
{
builder
.Configure(options =>
{
options.OnClientCreated((services, client) =>
{
// your client created handler here.
});
options.OnRequestCreated((services, request) =>
{
// your request created handler here.
});
options.OnHttpRequest(async (services, httpRequest) =>
{
// your http request handler here.
});
options.OnHttpResponse(async (services, httpResponse) =>
{
// your http response handler here.
});
})
;
})
;
}
More about event handlers in the important interfaces section of the Solid.Http.Core README.
Usage
You can inject ISolidHttpClientFactory using dependency injection and then use it to create an ISolidHttpClient. ISolidHttpClient is used to create an ISolidHttpRequest which then has a fully async fluent interface for performing an HTTP request.
[Route("[controller]")]
public class PostsController : Controller
{
private ISolidHttpClient _client;
public PostsController(ISolidHttpClientFactory factory)
{
_client = factory.CreateWithBaseAddress("https://jsonplaceholder.typicode.com");
}
[HttpGet]
public async Task<IActionResult> GetAsync(CancellationToken cancellationToken)
{
var posts = await _client
.GetAsync("posts", cancellationToken)
.AsMany<Post>()
;
return Ok(posts);
}
[HttpPut("{id}")]
public async Task<IActionResult> PutAsync([FromRoute] int id, [FromBody] Post body)
{
await _client
.PutAsync("posts/{id}")
.WithNamedParameter("id", id)
.WithJsonContent(body)
.ExpectSuccess()
;
return Ok(body);
}
class Post
{
public int Id { get; set; }
public int UserId { get; set; }
public string Title { get; set; }
public string Body { get; set; }
}
}
Related Skills
bluebubbles
339.5kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
gh-issues
339.5kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
healthcheck
339.5kHost security hardening and risk-tolerance configuration for OpenClaw deployments
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
