# HttpAgent > HttpAgent is a high-performance, flexible and easy-to-use .NET HTTP open-source library with a built-in industrial-grade HTTP traffic inspection engine (Profiler) that completely eliminates the "black box" dilemma in third-party API integration. Official HttpAgent documentation index for AI assistants and crawlers. Full content: [llms-full.txt](https://http.furion.net/en/llms-full.txt). ## Getting Started - [1.1 HTTP Remote Request Overview](https://http.furion.net/en/docs/getting-started/intro/): An HTTP remote request refers to the process by which a client (such as a Web browser, mobile application, and so on) sends a request to a r… - [1.2 Installation & Service Registration](https://http.furion.net/en/docs/getting-started/installation/): The Furion framework already includes this feature out of the box, so no additional NuGet package installation is required. If you are not u… - [1.3 Using with Claude Code / Codex (llms.txt)](https://http.furion.net/en/docs/getting-started/ai-assistants/): This website provides two AI-friendly files, llms.txt and llms-full.txt, so AI assistants (such as Claude Code and Codex) can read the entir… - [1.4 Comparison with Other HTTP Client Libraries](https://http.furion.net/en/docs/getting-started/comparison/): HttpAgent, Refit and RestSharp are all popular HTTP client solutions in the .NET ecosystem, each with a different focus: Refit champions "in… - [1.5 About the Author](https://http.furion.net/en/docs/getting-started/about-author/): However many people you have met, none of them was ever quite like me. - [1.6 Changelog](https://http.furion.net/en/docs/changelog/): Complete HttpAgent changelog: new features, breaking changes, bug fixes and improvements. ## Quick Start - [2.1 Getting Website Content](https://http.furion.net/en/docs/quick-start/get-content/): Getting website content is a common requirement, for example getting the homepage content of the Furion framework website (https://furion.ne… - [2.2 Sending Request Data](https://http.furion.net/en/docs/quick-start/with-data/): When retrieving data from third-party APIs, you usually need to carry request data, which can be URL address parameters or request content. … - [2.3 Form Form Submission (URL Encoding)](https://http.furion.net/en/docs/quick-start/form-urlencoded/): In web applications, the most common way to save user-defined data is through Form submission. A Form can carry not only text data but also … - [2.4 Downloading Network Resources](https://http.furion.net/en/docs/quick-start/download/): One of the most common application scenarios for HTTP remote requests is downloading network resources and saving them to the local disk, in… - [2.5 Uploading File Resources (OSS)](https://http.furion.net/en/docs/quick-start/upload/): In internet applications, uploading files is a common requirement, covering scenarios such as setting an avatar, posting image-and-text upda… - [2.6 HTTP Declarative Requests (Proxy Approach)](https://http.furion.net/en/docs/quick-start/declarative/): The HTTP Declarative Requests mechanism dynamically builds implementation classes at runtime by implementing the IHttpDeclarative interface.… - [2.7 Request Analysis Tool](https://http.furion.net/en/docs/quick-start/profiler/): Modern browsers typically include built-in developer tools that can capture and visually display all request and response data when users vi… - [2.8 Adding Authorization Credentials](https://http.furion.net/en/docs/quick-start/authentication/): In the internet society, network security is becoming increasingly critical, especially when integrating with third-party interfaces, which … - [2.9 Setting Cookie (Simulated/Automatic Login)](https://http.furion.net/en/docs/quick-start/cookies/): A Cookie is a piece of data sent by the server in an HTTP response. The client (optionally) stores the Cookie and returns it in subsequent r… - [2.10 Exception Handling (Exception Suppression)](https://http.furion.net/en/docs/quick-start/exception-handling/): When sending an HTTP remote request, you may encounter the following exceptional situations: - [2.11 Stress and Simulation Testing (Performance Testing)](https://http.furion.net/en/docs/quick-start/stress-test/): When developing application systems that are intended for the internet or that need to withstand concurrent access from many users, performa… - [2.12 Long Polling](https://http.furion.net/en/docs/quick-start/long-polling/): Long polling (Long Polling) is a technique for pushing data from the server to the client. It simulates the effect of server push by keeping… - [2.13 Server-Sent Events Unidirectional Communication](https://http.furion.net/en/docs/quick-start/sse/): With the rapid popularity of the artificial intelligence chatbot ChatGPT, the typewriter-effect conversation design simulated in its user in… - [2.14 WebSocket Duplex Communication](https://http.furion.net/en/docs/quick-start/websocket/): WebSocket is a protocol that provides full-duplex communication over a single TCP connection. WebSocket simplifies data exchange between the… - [2.15 HttpContext Forwarding and Proxying](https://http.furion.net/en/docs/quick-start/httpcontext-forward/): HttpContext forwarding refers to the process, within an ASP.NET Core application, of forwarding the contextual information of an HTTP reques… - [2.16 WebService Interface Requests (SOAP)](https://http.furion.net/en/docs/quick-start/webservice/): WebService is an application based on SOA (Service-Oriented Architecture) that is language- and platform-independent. It implements cross-la… - [2.17 Sending from a cURL Command](https://http.furion.net/en/docs/quick-start/from-curl/): We recommend using ReqBin to test and learn cURL commands online. This website provides a large number of ready-to-run cURL examples, which … - [2.18 Sending from JSON](https://http.furion.net/en/docs/quick-start/from-json/): The framework also supports initiating an HTTP request from a JSON configuration string in one step, completely replacing traditional chaine… - [2.19 OData API Requests](https://http.furion.net/en/docs/quick-start/odata/): OData (Open Data Protocol) is a REST-based Web protocol that lets you query an API through URL parameters just like operating on a database:… - [2.20 HTTP Request and Response Assertions (Assert)](https://http.furion.net/en/docs/quick-start/assertions/): During development and testing, you often need to validate the request content and response result — that is, "assertions". - [2.21 JSON Response Deserialization Wrapper](https://http.furion.net/en/docs/quick-start/json-wrapper/): When communicating with third-party APIs over HTTP remote calls, a unified JSON response structure is usually returned, such as the ApiResul… - [2.22 Automatic Access Token Management](https://http.furion.net/en/docs/quick-start/access-token/): When integrating with third-party services (such as WeChat Official Accounts, WeChat Work, etc.), you usually need to obtain an Access Token… - [2.23 API Call Quota Limits](https://http.furion.net/en/docs/quick-start/quota/): When integrating with third-party APIs (such as WeChat, payment gateways, etc.), you usually need to comply with their daily/monthly call li… - [2.24 Service Discovery (ServiceDiscovery)](https://http.furion.net/en/docs/quick-start/service-discovery/): Service discovery is a mechanism that allows developers to reference external services using logical names rather than physical addresses (s… - [2.25 HttpRemoteResult return type](https://http.furion.net/en/docs/quick-start/http-remote-result/): HttpRemoteResult is a generic type specifically used for the response content in the HTTP remote request module. The generic parameter TResu… - [2.26 Official DeepSeek Integration](https://http.furion.net/en/docs/quick-start/deepseek/): DeepSeek is a multifunctional artificial intelligence model developed by DeepSeek, capable of chat, writing, programming, data analysis, tra… - [2.27 Crawling Web Page Content (Crawler)](https://http.furion.net/en/docs/quick-start/web-crawler/): This section shows three ways to crawl web pages: direct fetching plus an HTML parsing library, and headless browser crawling for JavaScript… - [2.28 httpbin.org Online Testing Service](https://http.furion.net/en/docs/quick-start/httpbin/): httpbin.org is a free, open-source online HTTP request and response testing service, created by Kenneth Reitz, the author of the well-known … ## Request Builder - [3.1 HttpRequestBuilder Request Builder](https://http.furion.net/en/docs/request-builder/httprequestbuilder-request-builder/): HttpRequestBuilder is a builder tool specifically designed to construct the HttpRequestMessage object required when sending requests through… - [3.2 Creating a Builder Instance](https://http.furion.net/en/docs/request-builder/creating-a-builder-instance/): The constructor of the HttpRequestBuilder type is designed to be private, so it cannot be instantiated directly using the new keyword. Howev… - [3.3 Setting the Request Address](https://http.furion.net/en/docs/request-builder/setting-the-request-address/): In the static methods provided by the HttpRequestBuilder type, you can configure the request address. The following shows how to use the sta… - [3.4 Method Naming Conventions](https://http.furion.net/en/docs/request-builder/method-naming-conventions/): When designing the methods of the HttpRequestBuilder object, we follow a clear set of naming conventions to ensure that each method's functi… - [3.5 Setting the Trace Identifier](https://http.furion.net/en/docs/request-builder/setting-the-trace-identifier/): Specifies a unique identifier for the request to facilitate tracking and debugging. This identifier is set in the X-Trace-ID request header. - [3.6 Setting the Content Type](https://http.furion.net/en/docs/request-builder/setting-the-content-type/): Specifies the content type of the request. - [3.7 Setting the Content Encoding](https://http.furion.net/en/docs/request-builder/setting-the-content-encoding/): Sets the content encoding of the request. - [3.8 Setting JSON Content](https://http.furion.net/en/docs/request-builder/setting-json-content/): Sets the request's content type to application/json and sends JSON data. - [3.9 Setting HTML Content](https://http.furion.net/en/docs/request-builder/setting-html-content/): Sets the request's content type to text/html and sends HTML data. - [3.10 Setting XML Content](https://http.furion.net/en/docs/request-builder/setting-xml-content/): Sets the request's content type to text/xml and sends XML data. - [3.11 Setting Text Content](https://http.furion.net/en/docs/request-builder/setting-text-content/): Sets the request's content type to text/plain and sends plain text data. - [3.12 Setting Raw raw String Content](https://http.furion.net/en/docs/request-builder/setting-raw-raw-string-content/): In modern API testing tools such as Postman, users can send requests in the raw data format. In ASP.NET Core server-side applications, this … - [3.13 Setting URL-Encoded Form Content](https://http.furion.net/en/docs/request-builder/setting-url-encoded-form-content/): Sets the request's content type to application/x-www-form-urlencoded and sends form data. - [3.14 Setting File Content](https://http.furion.net/en/docs/request-builder/setting-file-content/): Sets file content from a local path or internet address, automatically detecting the file name and Content-Type. - [3.15 Setting Binary Stream Content](https://http.furion.net/en/docs/request-builder/setting-binary-stream-content/): Directly sets a Stream as the request content, suitable for file streams, memory streams, network streams, and other scenarios. - [3.16 Setting Request Content (Body)](https://http.furion.net/en/docs/request-builder/setting-request-content-body/): Supports setting any type of request content. - [3.17 Setting MCP/2.0 Message Content](https://http.furion.net/en/docs/request-builder/content-mcp/): SetMcpContent is an extension method specifically designed for the MCP (Model Context Protocol) 2.0 protocol, used to quickly build requests… - [3.18 Setting Multipart Form Content](https://http.furion.net/en/docs/request-builder/multipart/): Sets the request's content type to multipart/form-data and sends multipart form content. - [3.19 Setting Request Headers](https://http.furion.net/en/docs/request-builder/setting-request-headers/): Adds or modifies request headers. - [3.20 Setting Request Headers to Remove](https://http.furion.net/en/docs/request-builder/setting-request-headers-to-remove/): Removes the specified request headers. - [3.21 Setting the Fragment Identifier](https://http.furion.net/en/docs/request-builder/fragment/): Adds a fragment identifier to the URL. - [3.22 Setting the Timeout](https://http.furion.net/en/docs/request-builder/setting-the-timeout/): Sets the timeout duration for a single request. - [3.23 Configuring Retry Policies](https://http.furion.net/en/docs/request-builder/configuring-retry-policies/): Configures the retry policy for a single request. By default, if a retry policy is configured, the retry mechanism is triggered automaticall… - [3.24 Setting Path Segments](https://http.furion.net/en/docs/request-builder/setting-path-segments/): Adds URL path segments. - [3.25 Setting Path Segments to Remove](https://http.furion.net/en/docs/request-builder/setting-path-segments-to-remove/): Removes the specified path segments. - [3.26 Setting Query Parameters (URL Parameters)](https://http.furion.net/en/docs/request-builder/setting-query-parameters-url-parameters/): Adds or modifies URL query parameters. - [3.27 Setting Query Parameters to Remove](https://http.furion.net/en/docs/request-builder/setting-query-parameters-to-remove/): Removes the specified query parameters. - [3.28 Setting Path Parameters (Template/Configuration Parameters)](https://http.furion.net/en/docs/request-builder/path-params/): Replaces object template strings in the URL path. - [3.29 Setting Cookie](https://http.furion.net/en/docs/request-builder/setting-cookie/): Adds or modifies Cookie. - [3.30 Setting Cookies to Remove](https://http.furion.net/en/docs/request-builder/setting-cookies-to-remove/): Removes the specified Cookie. - [3.31 Setting the HttpClient instance name (multiple base addresses)](https://http.furion.net/en/docs/request-builder/setting-the-httpclient-instance-name-multiple-base-addresses/): By default, the system uses IHttpClientFactory to create HttpClient instances and sets the default client name to an empty string (string.Em… - [3.32 Setting the maximum buffer size for response content](https://http.furion.net/en/docs/request-builder/setting-the-maximum-buffer-size-for-response-content/): Configures the maximum number of bytes to buffer for the response content of a single request. - [3.33 Setting the HttpClient instance provider](https://http.furion.net/en/docs/request-builder/httpclient-provider/): By default, the system creates and automatically manages the lifetime of HttpClient instances through IHttpClientFactory. If you need to man… - [3.34 Adding request content processors](https://http.furion.net/en/docs/request-builder/adding-request-content-processors/): The IHttpContentProcessor interface defines how to build an HttpContent instance based on the content type or raw type of the request. - [3.35 Adding response content converters](https://http.furion.net/en/docs/request-builder/adding-response-content-converters/): The IHttpContentConverter interface specifies how to convert the response content HttpResponseMessage into an instance of the target type. - [3.36 Enabling HttpClient Pooling Management](https://http.furion.net/en/docs/request-builder/enabling-httpclient-pooling-management/): By default, a new HttpClient instance is created each time an HTTP request is sent. However, in scenarios that require frequent requests, th… - [3.37 Adding Resources to Release When the Request Ends](https://http.furion.net/en/docs/request-builder/adding-resources-to-release-when-the-request-ends/): Memory safety is an issue every developer must take seriously. When sending an HTTP request, you sometimes need to introduce unmanaged resou… - [3.38 Managing and Releasing Resources](https://http.furion.net/en/docs/request-builder/managing-and-releasing-resources/): Refer to sections 3.36 and 3.37 to learn how to release resources at the end of a request to avoid memory leaks. - [3.39 Setting the operation before adding request content](https://http.furion.net/en/docs/request-builder/setting-the-operation-before-adding-request-content/): Before assigning the HttpContent instance to the Content property of the HttpRequestMessage object, you can perform some additional pre-proc… - [3.40 Setting the operation before sending the request](https://http.furion.net/en/docs/request-builder/setting-the-operation-before-sending-the-request/): Before sending the HTTP remote request, you can perform some pre-processing operations. - [3.41 Setting the operation after receiving the response](https://http.furion.net/en/docs/request-builder/setting-the-operation-after-receiving-the-response/): After receiving the HTTP response, you can perform some post-processing operations. - [3.42 Setting the handling when sending the request fails](https://http.furion.net/en/docs/request-builder/setting-the-handling-when-sending-the-request-fails/): When an exception occurs while sending an HTTP request, you can perform some error-handling operations. - [3.43 Ensuring the request succeeds](https://http.furion.net/en/docs/request-builder/ensuring-the-request-succeeds/): When this feature is enabled, an exception is thrown automatically when the HTTP response status code is not in the 200-299 range (that is, … - [3.44 Setting Basic authentication](https://http.furion.net/en/docs/request-builder/setting-basic-authentication/): Adds an Authorization header to the request whose value consists of the Basic keyword followed by the Base64 encoding of the username:passwo… - [3.45 Setting Bearer authentication (JWT)](https://http.furion.net/en/docs/request-builder/setting-bearer-authentication-jwt/): Adds an Authorization header to the request in the format of the Bearer keyword followed by the Token string. - [3.46 Setting Digest authentication](https://http.furion.net/en/docs/request-builder/setting-digest-authentication/): Adds an Authorization header to the request in the format of the Digest keyword followed by the digest string generated from the username an… - [3.47 Setting custom authentication](https://http.furion.net/en/docs/request-builder/setting-custom-authentication/): Adds a custom Authorization header to the request, following the Schema value format. - [3.48 Disabling HTTP caching](https://http.furion.net/en/docs/request-builder/cache/): When sending an HTTP GET request, the server may cache the result of that request to improve performance. To cancel this caching behavior, y… - [3.49 Setting the request event handler](https://http.furion.net/en/docs/request-builder/message-handler/): The IHttpRequestEventHandler interface allows you to define pre-processing operations for HTTP requests. By implementing this interface, you… - [3.50 Simulating a Browser Environment (Crawler Detection)](https://http.furion.net/en/docs/request-builder/browser/): When developing a crawler, the target website may serve different page versions — such as PC and mobile — based on the user agent (User-Agen… - [3.51 Adding Response Status Code Handlers](https://http.furion.net/en/docs/request-builder/statuscode/): When sending an HTTP request and receiving a response, we often need to perform specific operations based on different response status codes… - [3.52 Enabling the Request Analysis Tool](https://http.furion.net/en/docs/request-builder/profiler/): Modern browsers usually have built-in developer tools that can capture and visually display all request and response data when a user visits… - [3.53 Setting the Client-Preferred Language and Region](https://http.furion.net/en/docs/request-builder/setting-the-client-preferred-language-and-region/): Globalization is a development trend for internet application products, so applications targeting a global audience should provide internati… - [3.54 Setting HttpRequestMessage Properties](https://http.furion.net/en/docs/request-builder/setting-httprequestmessage-properties/): In specific scenarios, we may need to add additional properties to the HttpRequestMessage request rather than through request headers. In th… - [3.55 Enabling Standard Request Headers](https://http.furion.net/en/docs/request-builder/enabling-standard-request-headers/): To improve the compatibility of network requests sent by the application through the HTTP client and avoid being blocked by WAF (Web Applica… - [3.56 Setting the Automatic Host Header](https://http.furion.net/en/docs/request-builder/setting-the-automatic-host-header/): The Host header is a required header in the HTTP/1.1 protocol. The Host header specifies the hostname and port number of the target server f… - [3.57 Configuring the Request Base Address](https://http.furion.net/en/docs/request-builder/configuring-the-request-base-address/): When integrating with multiple third-party APIs, we usually register and configure the BaseAddress of multiple HttpClient instances globally… - [3.58 Configuring the Referer Referrer Address](https://http.furion.net/en/docs/request-builder/configuring-the-referer-referrer-address/): When accessing certain third-party servers, the server may validate the Referer referrer address in the request headers. For example, when d… - [3.59 Configuring User-Agent](https://http.furion.net/en/docs/request-builder/configuring-user-agent/): The User-Agent request header is a characteristic string that allows servers and peer networks to identify the application, operating system… - [3.60 Configuring the HTTP Version](https://http.furion.net/en/docs/request-builder/configuring-the-http-version/): When making an HTTP remote request, the default HTTP protocol version used is 1.1. However, when accessing some third-party servers, these s… - [3.61 Exception Suppression Mechanism (Silent Handling)](https://http.furion.net/en/docs/request-builder/suppression/): When initiating an HTTP remote request, you may encounter the following exceptions: - [3.62 Removing the Default Content-Type of Content](https://http.furion.net/en/docs/request-builder/removing-the-default-content-type-of-content/): When integrating with some older HTTP services, setting the Content-Type request header when sending request content may cause request handl… - [3.63 Conditional Configuration Builder](https://http.furion.net/en/docs/request-builder/conditional-configuration-builder/): When building a builder instance for an HTTP remote request, you often need to dynamically configure request parameters based on different c… - [3.64 Enabling Assertions](https://http.furion.net/en/docs/request-builder/enabling-assertions/): When developing or writing unit tests and integration tests, we often need to verify whether the request content and response results meet e… - [3.65 Configuring Assertion Logic](https://http.furion.net/en/docs/request-builder/configuring-assertion-logic/): After enabling assertions, you can uniformly configure request assertions and response assertions through the Asserts(configure) method: - [3.66 Enabling the JSON Response Deserialization Wrapper](https://http.furion.net/en/docs/request-builder/enabling-the-json-response-deserialization-wrapper/): When communicating with a third-party API over HTTP, a unified JSON response structure is usually returned, such as the ApiResult type, wher… - [3.67 Handling Double Serialization of Response JSON](https://http.furion.net/en/docs/request-builder/handling-double-serialization-of-response-json/): When performing HTTP remote communication with a third-party API, in very rare cases you may encounter JSON data returned by the server that… - [3.68 Setting an Operation for Building the Final Request URL](https://http.furion.net/en/docs/request-builder/setting-an-operation-for-building-the-final-request-url/): In certain special scenarios (for example, when you need to dynamically concatenate a service path or query parameters), you can modify the … - [3.69 Setting Additional Configuration on Redirect](https://http.furion.net/en/docs/request-builder/setting-additional-configuration-on-redirect/): When a request undergoes automatic redirection (for example, status codes such as 301, 302, 307, 308), the framework clones a new builder ba… - [3.70 Clearing Request Content](https://http.furion.net/en/docs/request-builder/clearing-request-content/): When writing HTTP proxies or unit tests, sometimes you need to clear the already-set request content and its related configuration in one go… - [3.71 Appending Request Content](https://http.furion.net/en/docs/request-builder/appending-request-content/): When you need to dynamically add more data to existing request content without affecting the already-set ContentType and ContentEncoding, yo… - [3.72 Disabling Automatic Access Token Management](https://http.furion.net/en/docs/request-builder/disabling-automatic-access-token-management/): The framework has a built-in automatic Access Token management feature: you only need to implement the IHttpAccessTokenProvider interface an… - [3.73 Setting Custom Data for the Access Token Request](https://http.furion.net/en/docs/request-builder/setting-custom-data-for-the-access-token-request/): When using IHttpAccessTokenProvider to automatically obtain an Access Token, you sometimes need to pass additional dynamic parameters (such … - [3.74 Removing the Trailing / from the URL](https://http.furion.net/en/docs/request-builder/removing-the-trailing--from-the-url/): Some servers are sensitive to the trailing / in a path (for example, /api/ vs /api), which may cause a 301 redirect or route matching failur… - [3.75 Setting the Request Interface Quota Key](https://http.furion.net/en/docs/request-builder/setting-the-request-interface-quota-key/): Specifies a quota key for the current request, used to associate it with the quota limit rules configured in HttpClientOptions. - [3.76 Enabling ETag Response Caching](https://http.furion.net/en/docs/request-builder/enabling-etag-response-caching/): ETag (entity tag) is a mechanism in the HTTP protocol used to identify the version of a resource. The server returns the resource's ETag val… - [3.77 Setting the SOAP Request Header (WebService)](https://http.furion.net/en/docs/request-builder/setting-the-soap-request-header-webservice/): When calling a Web service based on the SOAP protocol, you usually need to specify SOAPAction in the request headers so that the server can … - [3.78 Simulating Request Responses and Exceptions (Mock)](https://http.furion.net/en/docs/request-builder/simulating-request-responses-and-exceptions-mock/): MockResponse and MockException are designed specifically for unit testing. They let you directly return a preset response or throw a preset … - [3.79 Cloning and Copying](https://http.furion.net/en/docs/request-builder/cloning-and-copying/): The framework provides Clone() and CopyTo() methods for copying or migrating the configuration of an HttpRequestBuilder. This is especially … - [3.80 Setting Custom Data](https://http.furion.net/en/docs/request-builder/setting-custom-data/): Inject custom data into HttpRequestBuilder with WithData so downstream internal components or interceptors can access it via the Items dicti… - [3.81 Getting the Request Builder or Request Message (Pre-flight Request)](https://http.furion.net/en/docs/request-builder/getting-the-request-builder-or-request-message-pre-flight-request/): In some cases, you may want to only obtain the HTTP request object itself without actually sending the request. For example: verifying in un… - [3.82 HttpRequestBuilder Unified Configurator](https://http.furion.net/en/docs/request-builder/httprequestbuilder-unified-configurator/): When constructing HttpRequestMessage objects through the HttpRequestBuilder class, if you need to globally configure all requests, the frame… - [3.83 Custom HttpRequestBuilder Extension Methods](https://http.furion.net/en/docs/request-builder/custom-httprequestbuilder-extension-methods/): In addition to the built-in HttpRequestBuilder methods, you can simplify code and reduce duplicate logic through custom extension methods. F… - [3.84 Custom Extensions for Other Builders](https://http.furion.net/en/docs/request-builder/custom-extensions-for-other-builders/): The following builders all derive from the HttpRequestBuilderConfigurator abstract type: ## Multipart Form Builder - [4.1 HttpMultipartFormDataBuilder Form Builder](https://http.furion.net/en/docs/multipart-builder/httpmultipartformdatabuilder-form-builder/): In internet applications, the most common way to save user-defined data is form submission using Form. Form forms can transmit not only text… - [4.2 Creating a Builder Instance](https://http.furion.net/en/docs/multipart-builder/creating-a-builder-instance/): Because the constructor of HttpMultipartFormDataBuilder is private, it cannot be instantiated directly using the new keyword. To set multipa… - [4.3 Setting the Content Boundary](https://http.furion.net/en/docs/multipart-builder/setting-the-content-boundary/): When building multipart form content, you can set the boundary (Boundary) for the multipart form content through the following chained-call … - [4.4 Keeping the Default Content-Type of the Content](https://http.furion.net/en/docs/multipart-builder/keeping-the-default-content-type-of-the-content/): When integrating with some older HTTP services, the Content-Type of the multipart form content should not be set when submitting form data, … - [4.5 Adding a Single Form Item](https://http.furion.net/en/docs/multipart-builder/adding-a-single-form-item/): Adds an independent item to the multipart form content, i.e., adds a single form property. - [4.6 Adding JSON content](https://http.furion.net/en/docs/multipart-builder/adding-json-content/): When you need to add JSON data to multipart form content, HttpMultipartFormDataBuilder provides flexible handling depending on whether a for… - [4.7 Adding HTML content](https://http.furion.net/en/docs/multipart-builder/adding-html-content/): Add HTML content to multipart form content. - [4.8 Adding XML content](https://http.furion.net/en/docs/multipart-builder/adding-xml-content/): Add XML content to multipart form content. - [4.9 Adding text content](https://http.furion.net/en/docs/multipart-builder/adding-text-content/): Add text content to multipart form content. - [4.10 Adding object content (complex forms / file uploads)](https://http.furion.net/en/docs/multipart-builder/adding-object-content-complex-forms--file-uploads/): When you need to add an object to multipart form content, HttpMultipartFormDataBuilder provides flexible handling depending on whether a for… - [4.11 Adding internet file content](https://http.furion.net/en/docs/multipart-builder/adding-internet-file-content/): Add file content from an internet address to multipart form content. - [4.12 Adding Base64 string file content](https://http.furion.net/en/docs/multipart-builder/adding-base64-string-file-content/): Add file content from a Base64 string to multipart form content. - [4.13 Adding local path file content (progress)](https://http.furion.net/en/docs/multipart-builder/adding-local-path-file-content-progress/): Add file content from a local path to the multipart form content. - [4.14 Adding Stream content](https://http.furion.net/en/docs/multipart-builder/adding-stream-content/): Add Stream content to the multipart form content. - [4.15 Adding byte array content](https://http.furion.net/en/docs/multipart-builder/adding-byte-array-content/): Add byte array content to the multipart form content. - [4.16 Adding MultipartFile content](https://http.furion.net/en/docs/multipart-builder/adding-multipartfile-content/): The MultipartFile type is designed specifically for handling multipart form files. Its constructor is private, so it cannot be instantiated … - [4.17 Adding IFormFile and IFormFileCollection content](https://http.furion.net/en/docs/multipart-builder/adding-iformfile-and-iformfilecollection-content/): In ASP.NET Core, the IFormFile interface is used to handle single file uploads, while the IFormFileCollection interface manages multiple fil… - [4.18 Adding IBrowserFile and IEnumerable content](https://http.furion.net/en/docs/multipart-builder/adding-ibrowserfile-and-ienumerableibrowserfile-content/): In Blazor, the IBrowserFile interface is used to handle single file uploads, while the IEnumerable interface manages multiple file uploads. … - [4.19 Adding FileInfo content](https://http.furion.net/en/docs/multipart-builder/adding-fileinfo-content/): If you need to upload a local file, you usually need to first create a FileInfo instance and then obtain the stream via OpenRead() to upload… - [4.20 Adding URL-encoded form content](https://http.furion.net/en/docs/multipart-builder/adding-url-encoded-form-content/): Add URL-encoded form content to the multipart form content. - [4.21 Adding multipart form content](https://http.furion.net/en/docs/multipart-builder/adding-multipart-form-content/): The need to add multipart form content within multipart form content is uncommon. - [4.22 Adding HttpContent content](https://http.furion.net/en/docs/multipart-builder/adding-httpcontent-content/): Add all request content derived from HttpContent. - [4.23 Setting the Operation Before Adding Form Item Content](https://http.furion.net/en/docs/multipart-builder/setting-the-operation-before-adding-form-item-content/): Before adding a HttpContent instance to a MultipartFormDataContent object, you can perform some preprocessing operations. For example, when … - [4.24 Setting the Form Name Policy (Transformer)](https://http.furion.net/en/docs/multipart-builder/setting-the-form-name-policy-transformer/): When sending HTTP form data, unlike directly sending JSON data in application/json format, you cannot directly use custom JSON serialization… - [4.25 Setting the Sort Rule for Multipart Form Content Items](https://http.furion.net/en/docs/multipart-builder/setting-the-sort-rule-for-multipart-form-content-items/): Although the need to sort multipart form content items is uncommon, some systems with high security requirements often need to validate the … - [4.26 Adding HttpMultipartFormDataBuilder Extensions](https://http.furion.net/en/docs/multipart-builder/extensions/): In addition to the HttpMultipartFormDataBuilder methods built into the system, you can also add custom extension methods to it to simplify c… ## Declarative Requests - [5.1 HTTP Declarative Requests](https://http.furion.net/en/docs/declarative/http-declarative-requests/): The HTTP Declarative Requests mechanism dynamically builds implementation classes at runtime by implementing the IHttpDeclarative interface.… - [5.2 Interface Definition and Usage](https://http.furion.net/en/docs/declarative/interface-definition-and-usage/): Before using HTTP Declarative Requests, you need to define an interface and make sure it implements the IHttpDeclarative interface: - [5.3 Defining Request Methods](https://http.furion.net/en/docs/declarative/defining-request-methods/): In the IHttpService declarative interface, you can define various API request methods. These methods must be marked with attributes derived … - [5.4 Defining Request Addresses](https://http.furion.net/en/docs/declarative/defining-request-addresses/): In the constructors of HttpMethodAttribute and its derived attributes, you can configure the request address. The following shows how to use… - [5.5 Synchronous and Asynchronous Methods](https://http.furion.net/en/docs/declarative/synchronous-and-asynchronous-methods/): In the declarative request interface method definitions of IHttpService, we provide both the implementation of asynchronous methods and supp… - [5.6 Defining Return Value Types](https://http.furion.net/en/docs/declarative/defining-return-value-types/): In HTTP declarative request interface methods, in addition to supporting common HTTP response types such as string, byte[], Stream, HttpRequ… - [5.7 Setting Trace Identifier](https://http.furion.net/en/docs/declarative/setting-trace-identifier/): Assigns a unique identifier to a request to facilitate tracking and debugging. This identifier is set in the X-Trace-ID request header. - [5.8 Setting Timeout](https://http.furion.net/en/docs/declarative/setting-timeout/): Sets the timeout duration for a single request. - [5.9 Configuring Retry Strategy](https://http.furion.net/en/docs/declarative/configuring-retry-strategy/): Configures the retry strategy for a single request. By default, once a retry strategy is configured, the retry mechanism is triggered automa… - [5.10 Setting Path Segments](https://http.furion.net/en/docs/declarative/setting-path-segments/): Adds or removes URL path segments. - [5.11 Setting Query Parameters (URL Parameters)](https://http.furion.net/en/docs/declarative/setting-query-parameters-url-parameters/): Add, modify, or remove URL query parameters. - [5.12 Setting Request Headers](https://http.furion.net/en/docs/declarative/setting-request-headers/): Add, modify, or remove request headers. - [5.13 Setting Path Parameters (Template/Configuration Parameters)](https://http.furion.net/en/docs/declarative/setting-path-parameters-templateconfiguration-parameters/): Replaces object template strings in the URL path. - [5.14 Setting Cookie](https://http.furion.net/en/docs/declarative/setting-cookie/): Adds, modifies, or removes a Cookie. - [5.15 Setting the HttpClient Instance Name (Multiple Base Addresses)](https://http.furion.net/en/docs/declarative/setting-the-httpclient-instance-name-multiple-base-addresses/): The system uses IHttpClientFactory to create HttpClient instances by default, and sets the default client name to an empty string (string.Em… - [5.16 Setting Request Content (Body)](https://http.furion.net/en/docs/declarative/setting-request-content-body/): Supports setting any type of request content. - [5.17 Setting Multipart Form Content (Complex Forms / File Upload)](https://http.furion.net/en/docs/declarative/multipart/): Sets the request content type to multipart/form-data and sends multipart form content. - [5.18 Disabling HTTP Caching](https://http.furion.net/en/docs/declarative/disabling-http-caching/): When sending an HTTP GET request, the server may cache the result of that request to improve performance. To cancel its caching behavior, yo… - [5.19 Ensuring Request Success](https://http.furion.net/en/docs/declarative/ensuring-request-success/): After adding the EnsureSuccessStatusCodeAttribute attribute, when the HTTP response status code is outside the 200-299 range (that is, when … - [5.20 Simulating a Browser Environment (Crawler Detection)](https://http.furion.net/en/docs/declarative/simulating-a-browser-environment-crawler-detection/): When developing a crawler program, the target website may provide different page versions based on the user agent (User-Agent) or other fact… - [5.21 Enabling the Request Profiler](https://http.furion.net/en/docs/declarative/enabling-the-request-profiler/): Modern browsers typically have built-in developer tools that can capture and visually present all request and response data when users visit… - [5.22 Setting the Client's Preferred Language and Region](https://http.furion.net/en/docs/declarative/setting-the-clients-preferred-language-and-region/): Globalization is the development trend for internet application products; therefore, products targeting a global audience should support int… - [5.23 Setting HttpRequestMessage Properties](https://http.furion.net/en/docs/declarative/setting-httprequestmessage-properties/): In certain scenarios, we may need to add extra properties to the HttpRequestMessage request rather than going through request headers. - [5.24 Enabling Standard Request Headers](https://http.furion.net/en/docs/declarative/enabling-standard-request-headers/): To improve the compatibility of network requests sent by applications through the HTTP client and avoid being blocked by WAF (Web applicatio… - [5.25 Setting the Automatic Host Header](https://http.furion.net/en/docs/declarative/setting-the-automatic-host-header/): The Host header is a required header in the HTTP/1.1 protocol. The Host header is used to specify the hostname and port number of the target… - [5.26 Setting the Request Base Address](https://http.furion.net/en/docs/declarative/setting-the-request-base-address/): When you need to integrate with multiple third-party APIs, you usually register and configure the BaseAddress of multiple HttpClient instanc… - [5.27 Setting the Referrer Address (Hotlink Protection)](https://http.furion.net/en/docs/declarative/setting-the-referrer-address-hotlink-protection/): When accessing certain third-party servers, the server may validate the Referer source address in the request headers. For example, when dow… - [5.28 Configuring the HTTP Version](https://http.furion.net/en/docs/declarative/configuring-the-http-version/): When initiating HTTP remote requests, the default HTTP protocol version is 1.1. However, when accessing certain third-party servers, these s… - [5.29 Exception Suppression Mechanism (Silent Handling)](https://http.furion.net/en/docs/declarative/exception-suppression-mechanism-silent-handling/): When initiating an HTTP remote request, the following exceptions may be encountered: - [5.30 Enabling Parameter Validation](https://http.furion.net/en/docs/declarative/validation/): When invoking HTTP declarative interface methods, the framework supports validating the legality of the passed parameter data. - [5.31 Enabling the JSON Response Deserialization Wrapper](https://http.furion.net/en/docs/declarative/enabling-the-json-response-deserialization-wrapper/): When performing HTTP remote communication with third-party APIs, a JSON response with a unified structure is usually returned, such as the A… - [5.32 Response JSON Double Serialization Handling](https://http.furion.net/en/docs/declarative/response-json-double-serialization-handling/): When communicating remotely with third-party APIs over HTTP, in very rare cases the JSON data returned by the server may be unintentionally … - [5.33 Setting the Request Event Handler](https://http.furion.net/en/docs/declarative/setting-the-request-event-handler/): The IHttpRequestEventHandler interface lets you define preprocessing operations for HTTP requests. By implementing this interface, you can c… - [5.34 Disabling Automatic Access Token Management](https://http.furion.net/en/docs/declarative/disabling-automatic-access-token-management/): The framework has a built-in Access Token automatic management feature. You only need to implement the IHttpAccessTokenProvider interface an… - [5.35 Removing the Trailing / from the URL Address](https://http.furion.net/en/docs/declarative/removing-the-trailing--from-the-url-address/): Some servers are sensitive to a trailing / in the path (such as /api/ versus /api), which may cause a 301 redirect or route matching failure… - [5.36 Setting the Request Interface Quota Key](https://http.furion.net/en/docs/declarative/setting-the-request-interface-quota-key/): Specifies a quota key for the current request, used to associate it with the quota limit rules configured in HttpClientOptions. - [5.37 Enabling ETag Response Caching](https://http.furion.net/en/docs/declarative/enabling-etag-response-caching/): ETag (entity tag) is a mechanism in the HTTP protocol used to identify the version of a resource. The server returns the resource's ETag val… - [5.38 Inheritance and Reuse](https://http.furion.net/en/docs/declarative/inheritance-and-reuse/): HTTP declarative requests support object-oriented features such as encapsulation and inheritance. Common interfaces can be defined in parent… - [5.39 Frozen Parameter Types](https://http.furion.net/en/docs/declarative/frozen-parameter-types/): In the previous chapters, we mentioned frozen parameter types several times, and now we can finally discuss them in depth. - [5.40 Getting the Request Builder or Request Message (Pre-flight Request)](https://http.furion.net/en/docs/declarative/getting-the-request-builder-or-request-message-pre-flight-request/): In some cases, you may want to only obtain the HTTP request object itself without actually sending the request. For example: verifying in un… - [5.41 Custom HTTP Declarative Extractor](https://http.furion.net/en/docs/declarative/custom-http-declarative-extractor/): In the 5.1 Declarative Requests section, we learned that every attribute or parameter type corresponds to an HTTP declarative extractor. The… - [5.42 Custom HTTP Declarative Extractor (Authorization)](https://http.furion.net/en/docs/declarative/custom-http-declarative-extractor-authorization/): The following is an example that shows how to implement automatic authorization and anonymous access by customizing the AuthenticationAttrib… - [5.43 The HttpDeclarativeBuilder Builder (Dynamic Building)](https://http.furion.net/en/docs/declarative/declarative-builder/): The HttpDeclarativeBuilder builder is provided by the framework specifically for dynamically building the various settings required by HTTP … ## Advanced Guide - [6.1 IHttpContentProcessor Content Processor](https://http.furion.net/en/docs/advanced-guide/ihttpcontentprocessor-content-processor/): IHttpContentProcessor is used to build an HttpContent instance based on the raw request content and type set by the user, and to set it as t… - [6.2 Built-in Content Processors](https://http.furion.net/en/docs/advanced-guide/built-in-content-processors/): - StringContentProcessor Content Processor - [6.3 IHttpContentProcessorFactory Content Processor Factory](https://http.furion.net/en/docs/advanced-guide/ihttpcontentprocessorfactory-content-processor-factory/): The IHttpContentProcessorFactory content processor factory is responsible for determining the appropriate IHttpContentProcessor content proc… - [6.4 Custom Content Processor (e.g. Serialization)](https://http.furion.net/en/docs/advanced-guide/custom-content-processor-eg-serialization/): In specific scenarios, when the framework's built-in IHttpContentProcessor content processors cannot meet your needs, you can solve the prob… - [6.5 Adding MessagePack Support](https://http.furion.net/en/docs/advanced-guide/adding-messagepack-support/): MessagePack is a compact, efficient binary serialization format designed for data exchange across multiple languages. Compared with JSON, Me… - [6.6 Adding Protobuf Support](https://http.furion.net/en/docs/advanced-guide/adding-protobuf-support/): Protobuf (Protocol Buffers) is a language-neutral, platform-neutral, extensible serialization format for structured data developed by Google… - [6.7 IHttpContentConverter Content Converter](https://http.furion.net/en/docs/advanced-guide/ihttpcontentconverter-content-converter/): IHttpContentConverter is used to convert the HttpResponseMessage object returned by an HTTP remote request into the target type, as shown in… - [6.8 Built-in Content Converters](https://http.furion.net/en/docs/advanced-guide/built-in-content-converters/): - StringContentConverter content converter - [6.9 IHttpContentConverterFactory Content Converter Factory](https://http.furion.net/en/docs/advanced-guide/ihttpcontentconverterfactory-content-converter-factory/): The IHttpContentConverterFactory content converter factory is responsible for determining the appropriate IHttpContentConverter content conv… - [6.10 IObjectContentConverterFactory Object Content Converter Factory](https://http.furion.net/en/docs/advanced-guide/iobjectcontentconverterfactory-object-content-converter-factory/): When the IHttpContentConverterFactory content converter factory cannot find a matching IHttpContentConverter content processor, the system f… - [6.11 Custom Object Content Converter (e.g. Serialization)](https://http.furion.net/en/docs/advanced-guide/custom-object-content-converter-eg-serialization/): The default content converter factory of IObjectContentConverterFactory returns an ObjectContentConverter instance, which uses the ReadFromJ… - [6.12 Custom Content Converter](https://http.furion.net/en/docs/advanced-guide/custom-content-converter/): In certain scenarios, when the framework's built-in IHttpContentConverter content converter cannot meet your needs, you can solve this by cu… - [6.13 Custom Generic Content Converter](https://http.furion.net/en/docs/advanced-guide/custom-generic-content-converter/): In addition to concrete types, the framework also supports the conversion of generic content. For example, define the following generic conv… - [6.14 IHttpRemoteService Service](https://http.furion.net/en/docs/advanced-guide/ihttpremoteservice-service/): IHttpRemoteService is an entry-point service for sending HTTP remote requests, and it forms the core of the HTTP remote request module. In s… - [6.15 HttpRemoteBuilder Builder](https://http.furion.net/en/docs/advanced-guide/httpremotebuilder-builder/): HttpRemoteBuilder is a builder used to configure and construct all the settings required by the IHttpRemoteService service. At application s… - [6.16 HttpRemoteOptions Configuration Options](https://http.furion.net/en/docs/advanced-guide/httpremoteoptions-configuration-options/): When adding the HTTP remote request service using the services.AddHttpRemote() method, an IHttpRemoteBuilder instance is returned. Through t… - [6.17 Unified Configuration of the HttpClient Client](https://http.furion.net/en/docs/advanced-guide/unified-configuration-of-the-httpclient-client/): In application project development, it is often necessary to uniformly configure all HttpClient client instances. To this end, the framework… - [6.18 Built-in Properties and Methods](https://http.furion.net/en/docs/advanced-guide/http-remote-service-members/): The IHttpRemoteService service type contains multiple properties as well as a rich variety of methods. - [6.19 Adding IHttpRemoteService Extensions](https://http.furion.net/en/docs/advanced-guide/http-remote-service-extensions/): In addition to the IHttpRemoteService methods provided by the system, you can also add custom extension methods to it to simplify code and r… - [6.20 HttpRemoteResult Return Value](https://http.furion.net/en/docs/advanced-guide/http-remote-result/): HttpRemoteResult is a generic type specifically used for response content in the HTTP remote request module. The generic parameter TResult r… - [6.21 Downloading Network Resources](https://http.furion.net/en/docs/advanced-guide/downloading-network-resources/): One of the most common application scenarios for HTTP remote requests is downloading network resources and saving them to the local disk, in… - [6.22 The HttpFileDownloadBuilder builder](https://http.furion.net/en/docs/advanced-guide/the-httpfiledownloadbuilder-builder/): In addition to the methods above, you can also use the HttpFileDownloadBuilder builder to configure the various settings required for downlo… - [6.23 File transfer event handler](https://http.furion.net/en/docs/advanced-guide/file-transfer-event-handler/): The IHttpFileTransferEventHandler interface allows you to define pre-processing operations for downloading or uploading files. By implementi… - [6.24 Uploading file resources](https://http.furion.net/en/docs/advanced-guide/uploading-file-resources/): In internet applications, users uploading files is a common requirement, covering scenarios such as setting avatars, publishing image-and-te… - [6.25 The HttpFileUploadBuilder Builder](https://http.furion.net/en/docs/advanced-guide/the-httpfileuploadbuilder-builder/): In addition to the above methods, you can also use the HttpFileUploadBuilder builder to configure the various settings required for uploadin… - [6.26 File Transfer Event Handler](https://http.furion.net/en/docs/advanced-guide/file-transfer-event-handler-2/): The IHttpFileTransferEventHandler interface allows you to define preprocessing operations for downloading or uploading files. By implementin… - [6.27 Stress and Simulation Testing](https://http.furion.net/en/docs/advanced-guide/stress-and-simulation-testing/): When developing application systems that face the internet or must withstand concurrent access from many users, performance stress testing a… - [6.28 HttpStressTestHarnessBuilder Builder](https://http.furion.net/en/docs/advanced-guide/httpstresstestharnessbuilder-builder/): The HttpStressTestHarnessBuilder builder provides the various settings the framework offers specifically for stress testing and simulation t… - [6.29 Long Polling](https://http.furion.net/en/docs/advanced-guide/long-polling/): Long polling (Long Polling) is a technique for pushing data from the server to the client. It simulates the effect of server push by keeping… - [6.30 HttpLongPollingBuilder Builder](https://http.furion.net/en/docs/advanced-guide/httplongpollingbuilder-builder/): The HttpLongPollingBuilder builder provides the various settings the framework offers specifically for sending long polling requests. The Ht… - [6.31 Long Polling Event Handler](https://http.furion.net/en/docs/advanced-guide/long-polling-event-handler/): The IHttpLongPollingEventHandler interface allows you to define pre-processing operations for sending long polling requests. By implementing… - [6.32 Terminating a Long Polling Request](https://http.furion.net/en/docs/advanced-guide/terminating-a-long-polling-request/): In addition to using CancellationToken to cancel a long polling request, the framework also checks the response headers for X-End-Of-Stream;… - [6.33 Server-Sent Events Unidirectional Communication](https://http.furion.net/en/docs/advanced-guide/server-sent-events-unidirectional-communication/): With the rapid rise in popularity of the AI chatbot ChatGPT, the typewriter-effect conversation design in its user interface left a deep imp… - [6.34 HttpServerSentEventsBuilder builder](https://http.furion.net/en/docs/advanced-guide/httpserversenteventsbuilder-builder/): The HttpServerSentEventsBuilder builder is provided by the framework specifically to configure the various settings needed to receive Server… - [6.35 Server-Sent Events event handler](https://http.furion.net/en/docs/advanced-guide/server-sent-events-event-handler/): The IHttpServerSentEventsEventHandler interface allows you to define pre-processing operations for receiving Server-Sent Events pushed by th… - [6.36 WebSocket Duplex Communication](https://http.furion.net/en/docs/advanced-guide/websocket-duplex-communication/): WebSocket is a protocol that performs full-duplex communication over a single TCP connection. WebSocket makes data exchange between the clie… - [6.37 The WebSocketClient Client](https://http.furion.net/en/docs/advanced-guide/the-websocketclient-client/): The framework includes the built-in WebSocketClient type, making it easy for users to establish a connection with a WebSocket server via the… - [6.38 HttpContext Forwarding and Proxying](https://http.furion.net/en/docs/advanced-guide/httpcontext-forwarding-and-proxying/): HttpContext forwarding refers to the process, within an ASP.NET Core application, of forwarding the context information of one HTTP request … - [6.39 The HttpContextForwardBuilder Builder](https://http.furion.net/en/docs/advanced-guide/the-httpcontextforwardbuilder-builder/): The HttpContextForwardBuilder builder is provided by the framework specifically for configuring the various settings required to convert the… - [6.40 HttpContextForwardOptions Configuration Options](https://http.furion.net/en/docs/advanced-guide/httpcontextforwardoptions-configuration-options/): The HttpContextForwardOptions type is specifically used to configure the forwarding behavior of HttpContext. You can register and configure … - [6.41 HttpContext Forwarding Extension Methods](https://http.furion.net/en/docs/advanced-guide/httpcontext-forwarding-extension-methods/): The framework provides various extension methods for HttpContext to meet the HTTP request forwarding needs of various scenarios. - [6.42 Advantages of HttpContext Forwarding](https://http.furion.net/en/docs/advanced-guide/advantages-of-httpcontext-forwarding/): When integrating with third-party API endpoints, the common approach is to create an entry program and call the HTTP remote request service … - [6.43 Applying HttpContext Forwarding in Microservices](https://http.furion.net/en/docs/advanced-guide/applying-httpcontext-forwarding-in-microservices/): In a microservices architecture, the HttpContext forwarding feature demonstrates significant value. Communication between microservices typi… - [6.44 Notes on Headers Ignored During Forwarding](https://http.furion.net/en/docs/advanced-guide/notes-on-headers-ignored-during-forwarding/): When using the HttpContext forwarding feature, the system automatically ignores the following request and response headers to ensure the val… - [6.45 The ForwardAttribute Forwarding Attribute](https://http.furion.net/en/docs/advanced-guide/the-forwardattribute-forwarding-attribute/): To simplify forwarding operations, the framework provides the convenient [Forward] controller action forwarding attribute. Compared to manua… - [6.46 HTTP Request Pipeline Handler](https://http.furion.net/en/docs/advanced-guide/pipeline/): The HTTP request pipeline handler is the core mechanism by which the framework sends HTTP remote requests; the final execution logic that ac… - [6.47 FTP Client Feature Outlook](https://http.furion.net/en/docs/advanced-guide/ftp/): Since Google Chrome announced the discontinuation of support for the FTP protocol in 2019, Microsoft followed suit in 2022 and removed suppo… - [6.48 Canceling HTTP Requests with CancellationToken](https://http.furion.net/en/docs/advanced-guide/cancellation/): The framework provides cancellation functionality for all methods that send HTTP remote requests, which can be achieved simply through the c… - [6.49 HttpClient Instance Configuration](https://http.furion.net/en/docs/advanced-guide/httpclient-instance-configuration/): The HTTP remote request service uses HttpClient internally to send requests. By configuring the HttpClient client, you can adjust the behavi… - [6.50 Common Property Configuration](https://http.furion.net/en/docs/advanced-guide/common-property-configuration/): // Enable for the default client - [6.51 Configuring IHttpClientBuilder](https://http.furion.net/en/docs/advanced-guide/configuring-ihttpclientbuilder/): The .AddHttpClient(name, configure) method returns an IHttpClientBuilder instance, allowing further configuration, such as setting the HttpM… - [6.52 Configuring SSL Certificates](https://http.furion.net/en/docs/advanced-guide/httpclient-ssl/): When using HttpClient to make HTTPS requests, if you need to configure a custom SSL/TLS certificate, this typically involves using the HttpC… - [6.53 Configuring the Proxy Server](https://http.furion.net/en/docs/advanced-guide/configuring-the-proxy-server/): If you need to send requests through a proxy server, you can do so by configuring the Proxy property of HttpClientHandler. The following exa… - [6.54 Configuring HTTP/3 Support](https://http.furion.net/en/docs/advanced-guide/configuring-http3-support/): HTTP/3 is the latest version of the HTTP protocol, built on top of the QUIC (Quick UDP Internet Connections) protocol, and is designed to pr… - [6.55 HttpClientOptions Extended Configuration (JSON Serialization)](https://http.furion.net/en/docs/advanced-guide/httpclientoptions-extended-configuration-json-serialization/): The framework supports customizing options for HttpClient (such as JSON serialization behavior) through the IHttpClientBuilder.ConfigureOpti… - [6.56 Service Resolution Configuration](https://http.furion.net/en/docs/advanced-guide/service-resolution-configuration/): When configuring HttpClient globally, it is sometimes necessary to resolve dependent services before configuring the client. For example, th… - [6.57 Learn More About Configuration](https://http.furion.net/en/docs/advanced-guide/learn-more-about-configuration/): For more information about the configuration of HttpMessageHandler and SocketsHttpHandler, please refer to the Microsoft official documentat… - [6.58 DelegatingHandler Request Processing Delegation (Interception)](https://http.furion.net/en/docs/advanced-guide/delegatinghandler-request-processing-delegation-interception/): DelegatingHandler is an important component of the HttpClient class in C#, and it allows you to process HTTP requests and responses in a cha… - [6.59 DelegatingHandler Use Cases](https://http.furion.net/en/docs/advanced-guide/delegatinghandler-use-cases/): - Pre-request processing: Before the request is sent to the server, the request can be modified or enhanced, such as adding authentication i… - [6.60 Custom DelegatingHandler](https://http.furion.net/en/docs/advanced-guide/custom-delegatinghandler/): The following is a simple DelegatingHandler example showing how to add a custom request header before the request is sent and log the respon… - [6.61 Implementing Automatic Authorization Token Refresh](https://http.furion.net/en/docs/advanced-guide/implementing-automatic-authorization-token-refresh/): It is recommended to prefer the approach introduced in the 2.22 Automatic Access Token Management section, which has a more complete built-i… - [6.62 HttpClientHandler Underlying Handler for Sending Requests](https://http.furion.net/en/docs/advanced-guide/httpclienthandler-underlying-handler-for-sending-requests/): HttpClientHandler is the core message handler in .NET used to configure and execute actual HTTP requests. It is a concrete implementation cl… - [6.63 Core Features of HttpClientHandler](https://http.furion.net/en/docs/advanced-guide/core-features-of-httpclienthandler/): HttpClientHandler provides fine-grained control over HTTP client behavior. Common configurations include: - [6.64 Collaboration with DelegatingHandler](https://http.furion.net/en/docs/advanced-guide/collaboration-with-delegatinghandler/): When you create an HttpClient via services.AddHttpClient(), .NET provides you with a HttpClientHandler by default as the "endpoint" of the p… - [6.65 Custom HttpClientHandler](https://http.furion.net/en/docs/advanced-guide/custom-httpclienthandler/): Although most interception logic should be implemented through DelegatingHandler, HttpClientHandler itself is also inheritable, allowing you… - [6.66 Best Practices](https://http.furion.net/en/docs/advanced-guide/best-practices/): - Do not casually replace the default HttpClientHandler unless you need special security or connection behavior. - [6.67 RateLimitedStream Rate-Limited Stream](https://http.furion.net/en/docs/advanced-guide/ratelimitedstream-rate-limited-stream/): On SaaS/PaaS application platforms, users are often billed based on resource usage (such as bandwidth and traffic). In particular, when user… - [6.68 FileTypeMapper File MIME Type Mapping](https://http.furion.net/en/docs/advanced-guide/filetypemapper-file-mime-type-mapping/): During file upload and download, it is often necessary to obtain or set the MIME type based on the file extension. This step usually require… - [6.69 JwtTokenUtility Parsing JWT Token](https://http.furion.net/en/docs/advanced-guide/jwttokenutility-parsing-jwt-token/): JwtTokenUtility is a lightweight JWT utility class that can parse the Payload portion of a JWT and extract common claims (Claims) without de… - [6.70 DigestCredentials Digest Authentication](https://http.furion.net/en/docs/advanced-guide/digestcredentials-digest-authentication/): Digest authentication is an enhanced-security method in the HTTP protocol for verifying user identity; compared to basic HTTP Basic authenti… - [6.71 HTTP Request Logging (Disabling)](https://http.furion.net/en/docs/advanced-guide/logging/): By default, the system prints relevant log information when sending HTTP remote requests, as shown below: ## Use Cases - [7.1 Use Cases](https://http.furion.net/en/docs/cases/use-cases/): This section summarizes common use cases of HTTP remote requests in application development. - [7.2 Using the Dynamic Object Clay to Build and Receive Request Data](https://http.furion.net/en/docs/cases/using-the-dynamic-object-clay-to-build-and-receive-request-data/): The dynamic object (Clay) has a very wide range of application scenarios in HTTP remote requests, especially when integrating with third-par… - [7.3 Using in Blazor WebAssembly Applications](https://http.furion.net/en/docs/cases/blazor/): Blazor WebAssembly applications run in the browser's sandbox environment and cannot use the operating system's underlying TCP sockets. The e… - [7.4 Using in File-Based Apps Applications](https://http.furion.net/en/docs/cases/file-based-apps/): Starting with the .NET 10 SDK, .NET provides File-Based Apps: a single .cs source file can be built, run and published — no project file (.c… - [7.5 Using in MAUI Applications](https://http.furion.net/en/docs/cases/maui/): .NET MAUI has built-in dependency injection support based on Microsoft.Extensions.DependencyInjection: register services on builder.Services… ## FAQ - [8.1 FAQ](https://http.furion.net/en/docs/faq/faq/): This section summarizes some common issues you may encounter when sending HTTP remote requests. - [8.2 Ignoring SSL certificate validation (https errors)](https://http.furion.net/en/docs/faq/ignoring-ssl-certificate-validation-https-errors/): If a certificate error such as The SSL connection could not be established, see inner exception. occurs while sending an HTTP remote request… - [8.3 A sent request hangs or blocks for a long time](https://http.furion.net/en/docs/faq/a-sent-request-hangs-or-blocks-for-a-long-time/): If a long hang or blocking occurs when sending an HTTP remote request, you may be using code like the following to obtain the local machine'… - [8.4 Forcing IPv4 or IPv6 requests](https://http.furion.net/en/docs/faq/forcing-ipv4-or-ipv6-requests/): By configuring the ConnectCallback of SocketsHttpHandler, you can force HttpClient to initiate requests using a specified IP version or loca… - [8.5 Handling redirect responses](https://http.furion.net/en/docs/faq/handling-redirect-responses/): When sending an HTTP remote request, if the target server returns a redirect response (such as 301 Moved Permanently, 302 Found, etc.), the … - [8.6 Enabling standard request headers](https://http.furion.net/en/docs/faq/enabling-standard-request-headers/): To improve the compatibility of network requests sent through the HTTP client and avoid being blocked by a WAF (Web Application Firewall), t… - [8.7 Setting the default User-Agent](https://http.furion.net/en/docs/faq/setting-the-default-user-agent/): When sending an HTTP request, if the user does not specify a User-Agent request header, the framework uses the Edge browser (version 142) Us… - [8.8 Sending relative-address (internal) requests](https://http.furion.net/en/docs/faq/sending-relative-address-internal-requests/): In Web applications such as ASP.NET or Blazor, relative addresses are typically used when sending internal HTTP requests. However, since the… - [8.9 Getting the Response Cookie](https://http.furion.net/en/docs/faq/getting-the-response-cookie/): In an HTTP request, if the server sets a Cookie, the response headers will contain one or more Set-Cookie key-value pairs. After the client … - [8.10 Configuring Windows Authentication](https://http.furion.net/en/docs/faq/configuring-windows-authentication/): Windows authentication is a security mechanism provided by Microsoft that verifies the identity of users or entities, ensuring that their ac… - [8.11 Configuring Kerberos and Active Directory Authentication](https://http.furion.net/en/docs/faq/configuring-kerberos-and-active-directory-authentication/): Kerberos is a network authentication protocol that uses symmetric-key cryptography to verify the identities of users and services. Through t… - [8.12 Response Content Decompression (Supporting gzip, deflate, brotli and zstd) and Content Encoding Issues](https://http.furion.net/en/docs/faq/decompression/): The following content does not apply to Blazor WebAssembly applications. - [8.13 JSON Serialization Configuration](https://http.furion.net/en/docs/faq/json-serialization/): The framework uses System.Text.Json by default to handle JSON serialization for HTTP requests, supporting the following configuration approa… - [8.14 Disabling the Distributed Tracing Context (the traceparent Header)](https://http.furion.net/en/docs/faq/disabling-the-distributed-tracing-context-the-traceparent-header/): When making an HTTP remote request, by default the distributed tracing context contained in the current Activity (such as traceparent and tr… - [8.15 Setting Content-Type (MIME)](https://http.furion.net/en/docs/faq/setting-content-type-mime/): When sending an HTTP remote request, if the request includes a data body, it is usually necessary to correctly set the Content-Type request … - [8.16 Using in Non-Dependency-Injection Environments (Console/WinForms/WPF)](https://http.furion.net/en/docs/faq/di/): In applications such as ASP.NET Core or Worker Service, dependency injection support is usually built in. You only need to register the requ… - [8.17 Parallel Requests (Batch Downloads)](https://http.furion.net/en/docs/faq/parallel/): In scenarios where multiple HTTP requests need to be sent simultaneously (such as batch downloads, concurrently calling multiple APIs, mixin… - [8.18 Using LoadIntoBufferAsync to Cache Response Content](https://http.furion.net/en/docs/faq/using-loadintobufferasync-to-cache-response-content/): When sending HTTP remote requests, the response content is returned as a stream by default and can only be read once. If you need to read th… - [8.19 Integrating with APIs Provided by Legacy Java Programs](https://http.furion.net/en/docs/faq/integrating-with-apis-provided-by-legacy-java-programs/): When integrating with APIs provided by legacy Java programs, you usually need to enable the feature that automatically sets the Host header … - [8.20 AddHttpRemote Ambiguity Error](https://http.furion.net/en/docs/faq/addhttpremote-ambiguity-error/): If you encounter an ambiguity error with the AddHttpRemote method, you can resolve it by adding an empty delegate parameter to it, as shown … - [8.21 Feedback and Suggestions](https://http.furion.net/en/docs/faq/feedback-and-suggestions/): You are welcome to submit an Issue to HttpAgent. ## Blog - [HttpAgent Released: Built-in Industrial-Grade HTTP Traffic Inspection Engine](https://http.furion.net/en/blog/hello-httpagent/): HttpAgent 1.0 is officially released: a high-performance, flexible, and easy-to-use .NET HTTP open-source library with a built-in industrial… - [Stop Tormenting HttpClient! Meet HttpAgent — Redefining .NET HTTP Requests](https://http.furion.net/en/blog/stop-suffering-with-httpclient/): From the pain points of HttpClient: five code styles, a cURL/JSON parsing engine, built-in resilience and an industrial-grade traffic inspec… - [Stop Digging Through Docs! HttpAgent Launches the Workshop + AI Assistant Duo — HTTP Code, Now WYSIWYG](https://http.furion.net/en/blog/workshop-ai-assistant/): Other HTTP libraries give you a library and a manual. HttpAgent gives you two new species: a visual code-generation Workshop and an AI assis… ## Optional - [llms-full.txt](https://http.furion.net/en/llms-full.txt): Complete docs and blog content in a single file - [sitemap.xml](https://http.furion.net/sitemap.xml): Full site map