Skip to content

API Reference ​

This document serves as the API index page for WebApiClientCore, providing an overview of core namespaces and types.

Note

This document is an API index. Detailed API documentation can be obtained through:

  • Use F12 (Go to Definition) in your IDE to view complete XML documentation
  • Use docfx tool to automatically generate complete API documentation
  • View dependency information on NuGet

Core Namespaces ​

WebApiClientCore ​

Core namespace containing core interfaces and base types for HTTP API declarations.

Core Interfaces ​

TypeDescription
IHttpApiMarker interface for HTTP API interfaces, all API interfaces should inherit from this
ITask<T>Async task wrapper supporting chained calls and retry mechanisms
IRetryTask<T>Interface for tasks supporting retry
IHandleTaskCancellable task handle interface
IChunkedableInterface supporting chunked transfer

Core Classes ​

TypeDescription
HttpApiStatic factory class for HTTP API, used to create API instances
HttpRequestHeaderConstants for HTTP request headers
HttpPathHTTP path parsing and processing utilities
JsonStringWrapper type for JSON strings
CollectionFormatCollection formatting options (CSV, SSV, TSV, PIPES, MULTI)

Extension Methods ​

TypeDescription
ApiParameterContextExtensionsExtension methods for API parameter context
ApiRequestContextExtensionsExtension methods for API request context
ApiResponseContextExtensionsExtension methods for API response context
TaskExtensionsTask-related extension methods

Exception Types ​

TypeDescription
ApiExceptionBase exception class for API calls
ApiRetryExceptionException thrown after retry failures
ApiInvalidConfigExceptionException thrown for invalid configuration
ApiResultNotMatchExceptionException thrown when result doesn't match
ApiResponseStatusExceptionResponse status exception
ApiReturnNotSupportedExceptionException for unsupported return types
ProxyTypeExceptionProxy type creation exception
ProxyTypeCreateExceptionProxy type creation failure exception
TypeInstanceCreateExceptionType instance creation exception

HttpContent Types ​

TypeDescription
JsonContentJSON format HTTP content
XmlContentXML format HTTP content
FormContentForm format HTTP content
FormDataContentmultipart/form-data format HTTP content
FormDataTextContentForm text content
FormDataFileContentForm file content
JsonPatchContentJSON Patch format HTTP content
BufferContentBuffer content wrapper

WebApiClientCore.Attributes ​

Attribute namespace containing various attributes for declarative HTTP requests.

Method-Level Attributes (HTTP Methods) ​

TypeDescription
HttpGetAttributeMarks HTTP GET request
HttpPostAttributeMarks HTTP POST request
HttpPutAttributeMarks HTTP PUT request
HttpDeleteAttributeMarks HTTP DELETE request
HttpPatchAttributeMarks HTTP PATCH request
HttpHeadAttributeMarks HTTP HEAD request
HttpOptionsAttributeMarks HTTP OPTIONS request
HttpMethodAttributeBase class for custom HTTP method attributes

Method-Level Attributes (Request Configuration) ​

TypeDescription
HttpHostAttributeSets the base address for API
HttpHostBaseAttributeBase class for host attributes
TimeoutAttributeSets request timeout
HeaderAttributeSets request header
FormFieldAttributeAdds form field
FormDataTextAttributeAdds form text data
BasicAuthAttributeSets Basic authentication header
HttpCompletionOptionAttributeSets HTTP completion option

Parameter-Level Attributes ​

TypeDescription
UriAttributeSpecifies request URI
PathQueryAttributePath query parameter
HeaderAttributeRequest header parameter
HeadersAttributeMultiple request headers parameter
JsonContentAttributeJSON body parameter
XmlContentAttributeXML body parameter
HttpContentAttributeRaw HttpContent parameter
FormContentAttributeForm body parameter
FormDataContentAttributeMultipart form parameter
FormFieldAttributeForm field parameter
FormDataTextAttributeForm text parameter
JsonFormFieldAttributeJSON form field
JsonFormDataTextAttributeJSON form text
RawJsonContentAttributeRaw JSON string content
RawXmlContentAttributeRaw XML string content
RawStringContentAttributeRaw string content
RawFormContentAttributeRaw form content
TimeoutAttributeParameter-level timeout setting

Return Value Attributes ​

TypeDescription
JsonReturnAttributeJSON response handler
XmlReturnAttributeXML response handler
RawReturnAttributeRaw response handler
DefaultValueReturnAttributeDefault value return handler
CustomValueReturnAttributeCustom value return handler
NoneReturnAttributeNo return value handler
SpecialReturnAttributeSpecial return handler

Filter Attributes ​

TypeDescription
ApiFilterAttributeAPI filter base attribute
LoggingFilterAttributeLogging filter
LogMessageLog message configuration

Cache Attributes ​

TypeDescription
ApiCacheAttributeAPI response cache attribute

WebApiClientCore.Contexts ​

Context namespace containing various context types during API calls.

Core Contexts ​

TypeDescription
HttpContextHTTP context containing request and response
HttpClientContextHttpClient related context
ApiRequestContextAPI request context
ApiParameterContextAPI parameter context
ApiResponseContextAPI response context

WebApiClientCore.Serialization ​

Serialization namespace containing JSON, XML and other serialization-related types.

Serializers ​

TypeDescription
JsonBufferSerializerJSON buffer serializer
XmlSerializerXML serializer
KeyValueSerializerKey-value pair serializer
Utf8JsonWriterCacheUTF-8 JSON writer cache

JSON Converters ​

TypeDescription
JsonDateTimeConverterJSON date time converter
JsonDateTimeAttributeJSON date time attribute
JsonLocalDateTimeConverterJSON local date time converter
JsonStringTypeConverterJSON string type converter

Serialization Options ​

TypeDescription
KeyValueSerializerOptionsKey-value serialization options
KeyNamingOptionsKey naming options
KeyNamingStyleKey naming style (CamelCase, PascalCase, SnakeCase, etc.)

WebApiClientCore.Abstractions ​

Abstraction namespace defining core abstract interfaces and descriptor types.

Core Interfaces ​

TypeDescription
IApiFilterAPI filter interface
IApiParameterAPI parameter interface
IHttpApiActivatorHTTP API activator interface
IHttpApiInterceptorHTTP API interceptor interface
IResponseCacheProviderResponse cache provider interface
IApiActionDescriptorProviderAPI action descriptor provider interface
IApiActionInvokerProviderAPI action invoker provider interface

Descriptor Types ​

TypeDescription
ApiActionDescriptorAPI action descriptor
ApiParameterDescriptorAPI parameter descriptor
ApiReturnDescriptorAPI return value descriptor
ApiDataTypeDescriptorAPI data type descriptor

Configuration Types ​

TypeDescription
HttpApiOptionsHTTP API configuration options
HttpApiRequestMessageHTTP API request message
CachePolicyCache policy
ResultStatusResult status enum
ResponseCacheEntryResponse cache entry
ResponseCacheResultResponse cache result
KeyValueKey-value pair
IDataCollectionData collection interface

WebApiClientCore.HttpMessageHandlers ​

HTTP message handler namespace.

TypeDescription
AuthorizationHandlerAuthorization handler base class
CookieAuthorizationHandlerCookie authorization handler

WebApiClientCore.DependencyInjection ​

Dependency injection namespace providing service registration and configuration.


NuGet Packages ​

WebApiClientCore is distributed as NuGet packages:

Viewing Complete API in IDE ​

In IDEs (such as Visual Studio, JetBrains Rider, VS Code), view complete API documentation through:

  1. Go to Definition: Press F12 or Ctrl+Click on type name
  2. Object Browser: Open "View > Object Browser" in Visual Studio
  3. IntelliSense: API hints are displayed automatically while typing

All public APIs include complete XML documentation comments that can be viewed directly in your IDE.

Auto-Generating API Documentation ​

To generate a complete API reference documentation website, use the docfx tool:

bash
# Install docfx
dotnet tool install -g docfx

# Generate documentation
docfx init -q
docfx docfx.json --serve

docfx automatically reads assembly XML documentation and generates a complete API reference website.