NetWasm.System.Net.Http 0.13.0

Prefix Reserved
dotnet add package NetWasm.System.Net.Http --version 0.13.0
                    
NuGet\Install-Package NetWasm.System.Net.Http -Version 0.13.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="NetWasm.System.Net.Http" Version="0.13.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetWasm.System.Net.Http" Version="0.13.0" />
                    
Directory.Packages.props
<PackageReference Include="NetWasm.System.Net.Http" />
                    
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 NetWasm.System.Net.Http --version 0.13.0
                    
#r "nuget: NetWasm.System.Net.Http, 0.13.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 NetWasm.System.Net.Http@0.13.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=NetWasm.System.Net.Http&version=0.13.0
                    
Install as a Cake Addin
#tool nuget:?package=NetWasm.System.Net.Http&version=0.13.0
                    
Install as a Cake Tool

NetWasm.System.Net.Http

NetWasm.System.Net.Http supplies the System.Net.Http assembly for the netwasm0.1 profile: upstream .NET's HttpClient, HttpRequestMessage, HttpResponseMessage and content types over WASI 0.3's wasi:http.

The package carries the NetWasm,Version=v0.1 asset and preserves the public System.Net.Http assembly identity. It does not add a JavaScript HTTP fallback or replace desktop .NET's built-in System.Net.Http reference.

Outgoing requests

HttpClient sends requests through the host's wasi:http client. Wasmtime, Spin, wasmCloud and NetWasm's Node.js and browser hosts provide it; a command run with wasmtime run needs -Shttp.

HTTP services

A project with <OutputType>Component</OutputType> and <NetWasmWorld>service</NetWasmWorld> that references this package is a wasi:http service. Implement one method in the project's root namespace (or in NetWasmHttpServiceNamespace):

public static partial class ServiceExports
{
    public static async partial Task<HttpResponseMessage> Handle(HttpRequestMessage request)
    {
        var body = await request.Content!.ReadAsStringAsync();
        return new HttpResponseMessage(HttpStatusCode.OK)
        {
            Content = new StringContent($"{request.Method} {request.RequestUri!.PathAndQuery} [{body}]"),
        };
    }
}

The package generates the wasi:http handler that turns each request into an HttpRequestMessage, calls Handle, and streams the HttpResponseMessage back with its status, headers and content. An exception from Handle answers with wasi:http's internal error, which hosts send as a 500. Handle can use HttpClient to call other services.

dotnet publish writes one component that wasmtime serve -Sp3 -Scli, Spin and wasmCloud run unchanged. Node.js cannot serve WASI 0.3 HTTP components yet.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • Unsupported 0.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NetWasm.System.Net.Http:

Package Downloads
NetWasm.System.Net.Http.Json

NetWasm netwasm0.1 metadata-first System.Net.Http.Json.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.13.0 106 11/13/2026
0.13.0-preview.1 55 11/13/2026
0.12.1 138 11/10/2026
0.12.1-preview.1 55 11/10/2026
0.12.0 83 11/10/2026
0.12.0-preview.1 56 11/10/2026
0.11.0 107 11/6/2026
0.11.0-preview.1 54 11/6/2026
0.10.8 99 11/4/2026
0.10.8-preview.1 55 11/4/2026
0.10.7 112 11/2/2026
0.10.7-preview.1 57 11/2/2026
0.10.0 136 10/21/2026
0.10.0-preview.1 67 10/21/2026
0.9.0 111 10/20/2026
0.9.0-preview.1 61 10/20/2026
0.8.0 98 10/16/2026
0.8.0-preview.1 57 10/16/2026
0.7.0 141 10/6/2026
0.7.0-preview.1 78 10/6/2026
Loading failed