Rask.Api 0.23.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Rask.Api --version 0.23.0
                    
NuGet\Install-Package Rask.Api -Version 0.23.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rask.Api" Version="0.23.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rask.Api" Version="0.23.0" />
                    
Directory.Packages.props
<PackageReference Include="Rask.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rask.Api --version 0.23.0
                    
#r "nuget: Rask.Api, 0.23.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rask.Api@0.23.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rask.Api&version=0.23.0
                    
Install as a Cake Addin
#tool nuget:?package=Rask.Api&version=0.23.0
                    
Install as a Cake Tool

Rask.Api

Ordinary ASP.NET Core API controllers and minimal API endpoints, hosted properly inside a Rask app.

builder.Services.AddRaskApi();
...
app.MapRaskApi();
app.UseRask<App>();

Write the endpoint however you normally would — an [ApiController] class, or app.MapGet(...). Nothing about it is Rask-specific.

What this actually fixes

Not ordering. Endpoint routing matches on precedence, never on registration order, and every route you write is more specific than Rask's /{**path} catch-all — so your endpoints answer from either side of UseRask, and always did.

What order cannot fix is a request under your API prefix matching nothing. Without a guard it reaches the catch-all and renders the app, so a mistyped or deleted route answers 200 with a web page, and the caller's JSON parse fails somewhere a long way from the cause. MapRaskApi() answers 404 with an RFC 9457 problem document under ApiOptions.Prefix (default /api) and leaves every other path alone.

It is an ordinary endpoint rather than a fallback on purpose: a fallback sits at int.MaxValue and would lose to the catch-all, while at the same order /api/{**rest} outranks /{**path} — and loses in turn to every real route beneath it.

The typed client

Rask.Api.Client generates a typed client from these same endpoints, so browser and component code calls await posts.Get(3) instead of writing the URL, the verb and the response type out by hand a second time.

Documentation: https://rask.sh

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rask.Api:

Package Downloads
Rask.Server

The ASP.NET host for Rask, a full-stack .NET web framework, with every battery: database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator and query cache, accounts, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, SQLite snapshots and continuous backup. Renders Rask components with live updates over a WebSocket. RaskApp.Create(args).Run<App>() is the whole Program.cs, and RaskApp.Create(args).Serve() the whole server of a WebAssembly client; app.Configure(c => c.Jobs.Off()) is how an app does without one. Depends on Rask, the shared core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.23.1-alpha.0.2537 0 10/31/2026
0.23.1-alpha.0.2531 0 10/31/2026
0.23.1-alpha.0.2529 0 10/31/2026
0.23.1-alpha.0.2528 0 10/31/2026
0.23.1-alpha.0.2527 23 10/30/2026
0.23.1-alpha.0.2515 34 10/30/2026
0.23.1-alpha.0.2514 33 10/30/2026
0.23.1-alpha.0.2504 46 10/30/2026
0.23.1-alpha.0.2489 36 10/30/2026
0.23.1-alpha.0.2488 42 10/29/2026
0.23.1-alpha.0.2487 39 10/29/2026
0.23.1-alpha.0.2481 41 10/29/2026
0.23.1-alpha.0.2478 40 10/29/2026
0.23.1-alpha.0.2422 47 10/29/2026
0.23.1-alpha.0.2421 45 10/28/2026
0.23.1-alpha.0.2420 42 10/28/2026
0.23.1-alpha.0.2361 45 10/28/2026
0.23.1-alpha.0.2343 63 10/28/2026
0.23.1-alpha.0.2248 56 10/27/2026
0.23.0 729 9/18/2026
Loading failed