Jan 26

I was recently asked how to POST a Raw String Body Using DalSoft RestClient, this reminded me that the documentation for DalSoft RestClient is a little out of date.

Updating the docs has been on my todo list for a while now, so I’ve made a new years resolution to get this done. I’m going to start with a series of posts about what you can do with DalSoft RestClient, I’ll then rework these posts into the new docs.

Here’s the first post it’s a quick one – HTTP POST a Raw String Body Using C#

var client = new RestClient("https://your-server/api");
var response = await client.Resource("your-api-resource").Post("string that you want to post");

Yes you can do this as one liner with HttpClient or using one of the plethora of nuget Rest Client Packages, but you would be missing out on easy testing and pipelines then!

Like what you see? There’s a lot more head over to the DalSoft RestClient docs and GitHub Repo.

Tagged with:
Mar 02

Last month I tweeted about a blog post I found interesting:

I thought it was really cool that you could use Razor Components in existing ASP.NET Razor Pages (which is what you build Blazor apps with). I think Razor Pages are one of the easiest ways to develop a web app using ASP.NET Core. Also some things such as authentication are still better served by a ‘traditional web app’ – for example Razor Pages is the default for ASP.NET Identity.

This is why I was glad that this functionality was added to ASP.NET 3.0 Razor Pages and MVC Views, it means a modern alternative to view components and partial views. It also gets you familiar with Razor Components which are the building blocks of a Blazor App.


I have created a nuget package that means in Razor Pages you can use your Razor Components like this:

<hello-world message='$"Hello World {DateTime.Now}"' />

Instead of like this:

<component type="typeof(HelloWorld)" render-mode="Static" param-message='$"Hello World {DateTime.Now}"' />

Continue reading »

Tagged with:
preload preload preload