Hawf 2.0.0

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

hawf

Run Tests Publish Release Nuget

Http API Wrapper Framework - Quickly build API wrappers and clients

Installation

You can find the package on NuGet or install through command line:

dotnet add package Hawf

Basic Usage

Creating an API is as simple as inherting the ApiBase and annotate the ApiClient attribute:

[ApiClient("https://api.mywebsite.com")]
public class MyApi : ApiBase<MyApi>
{
    public Task<string> MyApiCallAsync() => GetStringAsync("/myendpoint");
}

You can then instantiate the class and call the api endpoint:

var api = new MyApi();

var response = await api.MyApiCallAsync();

Console.WriteLine(response);

This is only a very basic example of how it works. The framework provides various convenient methods and tools to quickly create a complete client for your API.

Features

  • Quickly define your API endpoints into client code with a rich builder API.
  • Supports automatic JSON serialization/deserialization.
  • Handles authentication and authorization of your endpoints.
  • Can avoid rate limits to trigger on APIs
  • Based on the Task Asynchronous Programming (TAP) pattern.
  • Response caching.
  • Standardizes the code structure to keep it readable and maintainable.

For a complete overview of all the features, check out the documentation.

Documentation

Check out the main documentation here.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.
  • net8.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Hawf:

Package Downloads
ManiaExchange.ApiClient

Mania exchange general API client.

TrackmaniaIo.ApiClient

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 650 6/26/2024
1.0.5 516 8/10/2022
1.0.4 437 8/10/2022
1.0.3 2,611 6/17/2022
1.0.2 457 6/16/2022
1.0.1 467 6/14/2022
1.0.0 481 6/9/2022