MxIO.ApiClient.WebExtensions 1.1.147.1

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

MxIO.ApiClient.WebExtensions

Extensions for converting API response objects to HTTP results in ASP.NET Core applications. This package simplifies the process of transforming API client responses into appropriate HTTP responses.

Features

  • Extension methods to convert ApiResponseDto objects to IActionResult
  • Automatic HTTP status code mapping based on API response status
  • Simplifies API controller implementations

Installation

dotnet add package MxIO.ApiClient.WebExtensions

Basic Usage

[ApiController]
[Route("api/[controller]")]
public class MyController : ControllerBase
{
    private readonly IMyApiClient _apiClient;

    public MyController(IMyApiClient apiClient)
    {
        _apiClient = apiClient;
    }

    [HttpGet]
    public async Task<IActionResult> Get()
    {
        // Get data from your API client
        var response = await _apiClient.GetDataAsync();
        
        // Convert the API response to an appropriate HTTP response
        return response.ToHttpResult();
    }
}

License

GPL-3.0-only

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.147.1 717 6/23/2025
1.1.146.1 377 6/16/2025
1.1.145.1 346 6/9/2025
1.1.144.1 268 6/2/2025
1.1.143.1 279 5/26/2025
1.1.142.1 287 5/19/2025
1.1.141.1 351 5/12/2025
1.1.140.1 391 5/5/2025
1.1.139.1 335 4/28/2025
1.1.138.1 304 4/26/2025
1.1.137.1 234 4/25/2025
1.1.136.1 361 4/23/2025
1.1.135.1 333 4/21/2025
1.1.134.1 281 4/19/2025
1.1.133.1 191 4/19/2025
1.1.132.1 201 4/19/2025
1.1.131.1 213 4/19/2025
1.1.130.1 377 4/14/2025
Loading failed