---
title: SAIF.NetCore.HttpClients operations and processes
summary: Business and technical operations supported by this library.
status: draft
owner: Framework
last_reviewed: 2026-10-02
library: SAIF.NetCore.HttpClients
reference_type: package
---

# SAIF.NetCore.HttpClients operations and processes

This page is the operation catalog and cross-operation hub for `SAIF.NetCore.HttpClients`. Each operation's detailed, step-by-step logic lives in its own page under `operations/`.

## Operation catalog
| Operation | Intent | Trigger | Inputs | Outputs | Rules |
| --- | --- | --- | --- | --- | --- |
| [Initialize client](operations/initialize-client.md) | Configure the base URL and caller identity an `HttpJsonClient` instance uses for every request | A consumer constructs or configures a resolved `HttpJsonClient` before issuing a request | Base URL, `ClientInfo` (machine name, application ID, user name), optional timeout override | An initialized `HttpJsonClient` ready to accept requests, or a deferred `ClientNotInitializedException` on first use | [BR-HTTP-01](business-rules.md#br-http-01-client-initialization-required-before-any-request), [BR-HTTP-02](business-rules.md#br-http-02-base-url-required-in-the-two-argument-constructor), [BR-HTTP-03](business-rules.md#br-http-03-clientinfo-requires-non-null-identity-values), [BR-HTTP-06](business-rules.md#br-http-06-timeout-override-bounds) |
| [Configure authentication](operations/configure-authentication.md) | Attach bearer, Basic, or NTLM credentials that subsequent requests send to the target endpoint | A consumer calls `BearerToken`, `SetBasicAuthentication`, or `SetNtlmAuthentication` before issuing requests | Bearer token string, Basic username/password, or NTLM username/password (or none, for current identity) | An `HttpJsonClient` instance configured to attach the selected credential on outgoing requests | [BR-HTTP-08](business-rules.md#br-http-08-bearer-token-header), [BR-HTTP-09](business-rules.md#br-http-09-basic-authentication-header-encoding), [BR-HTTP-10](business-rules.md#br-http-10-ntlm-authentication%2C-explicit-or-current-identity), [BR-HTTP-16](business-rules.md#br-http-16-duplicate-authorization-key-guard-on-basic-authentication) |
| [Configure options](operations/configure-options.md) | Replace the retry, header-persistence, and serializer behavior used for subsequent requests | A consumer calls `SetOptions(HttpClientOptions)` | An `HttpClientOptions` instance (retry delay, retry status codes, header persistence flag, serializer) | An `HttpJsonClient` instance with updated request-building and retry behavior | [BR-HTTP-04](business-rules.md#br-http-04-retry-on-configured-response-status-codes), [BR-HTTP-07](business-rules.md#br-http-07-custom-headers-cleared-after-each-request-unless-persisted), [BR-HTTP-11](business-rules.md#br-http-11-serializer-selection) |
| [Execute request](operations/execute-request.md) | Build, authenticate, execute, and retry an outbound JSON HTTP request for one of the five supported verbs | A consumer calls `Delete`/`Get`/`Patch`/`Post`/`Put` or an async equivalent | HTTP verb, resource path, optional JSON request body | An `IHttpRequestResult` describing status, content, headers, response date, and any error information | [BR-HTTP-01](business-rules.md#br-http-01-client-initialization-required-before-any-request), [BR-HTTP-04](business-rules.md#br-http-04-retry-on-configured-response-status-codes), [BR-HTTP-05](business-rules.md#br-http-05-delay-between-retry-attempts), [BR-HTTP-06](business-rules.md#br-http-06-timeout-override-bounds), [BR-HTTP-07](business-rules.md#br-http-07-custom-headers-cleared-after-each-request-unless-persisted), [BR-HTTP-08](business-rules.md#br-http-08-bearer-token-header), [BR-HTTP-11](business-rules.md#br-http-11-serializer-selection), [BR-HTTP-12](business-rules.md#br-http-12-caller-identity-headers-on-every-request), [BR-HTTP-13](business-rules.md#br-http-13-null-response-handling), [BR-HTTP-14](business-rules.md#br-http-14-response-date-parsing), [BR-HTTP-15](business-rules.md#br-http-15-error-message-derivation-order), [BR-HTTP-17](business-rules.md#br-http-17-error-exception-populated-only-for-4xx), [BR-HTTP-21](business-rules.md#br-http-21-generic-async-verb-methods-are-disabled) |
| [Consume result](operations/consume-result.md) | Convert `IHttpRequestResult` content and headers into strongly typed values | A consumer calls `GetResult<T>`, `GetContent<T>`, or `GetHeaderValue<T>` on a returned result | An `IHttpRequestResult` and a target type `T` | A converted `T` value (or `default(T)` for `GetResult<T>` on failure) | [BR-HTTP-18](business-rules.md#br-http-18-getresult-returns-default-on-failure), [BR-HTTP-19](business-rules.md#br-http-19-content-conversion-trims-quotes-and-honors-culture), [BR-HTTP-20](business-rules.md#br-http-20-case-insensitive-header-lookup) |

## Process flow diagram
The following diagram visualizes the primary operational flow across operations, from client initialization through result consumption.

```mermaid
flowchart TD
    Start([Consumer resolves HttpJsonClient]) --> Init["Initialize client<br>(base URL, ClientInfo)"]
    Init --> Auth["Configure authentication<br>(bearer / basic / NTLM)"]
    Auth --> Opts["Configure options<br>(retry, persistence, serializer)"]
    Opts --> Exec["Execute request<br>(verb method call)"]
    Exec --> Valid{"Initialized?"}
    Valid -->|No| Err([ClientNotInitializedException])
    Valid -->|Yes| Retry{"Retryable status<br>and retries remain?"}
    Retry -->|Yes| Exec
    Retry -->|No| Result["Consume result<br>(GetResult/GetContent/GetHeaderValue)"]
    Result --> End([Typed value returned to consumer])
```

## Database interactions

This library has no database interactions; no operation reads from or writes to a database.

## Failure and edge-case behavior
- A verb method called before both `ClientInfo` and the base URL are set throws `ClientNotInitializedException` without attempting a network call ([BR-HTTP-01](business-rules.md#br-http-01-client-initialization-required-before-any-request)).
- A retryable response status (default 401, 502, 503) is retried up to 3 additional times with a blocking delay between attempts ([BR-HTTP-04](business-rules.md#br-http-04-retry-on-configured-response-status-codes), [BR-HTTP-05](business-rules.md#br-http-05-delay-between-retry-attempts)).
- With default options, custom headers (including a Basic `Authorization` header) are dropped on retry attempts, so a 401 retry cannot succeed when Basic auth is the only credential in use ([BR-HTTP-07](business-rules.md#br-http-07-custom-headers-cleared-after-each-request-unless-persisted)).
- `CreateRequestResult` contains defensive handling that normalizes a null RestSharp response into an unsuccessful result rather than surfacing a null-reference condition, but `ExecuteRestCall` reads `response.StatusCode` immediately after executing the request and before any null check, so a null response currently throws `NullReferenceException` there instead of reaching that defensive handling ([BR-HTTP-13](business-rules.md#br-http-13-null-response-handling)).
- Calling any generic `*Async<T>` overload is a compile-time error ([BR-HTTP-21](business-rules.md#br-http-21-generic-async-verb-methods-are-disabled)).

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)

## Sources
- `src/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/HttpJsonClient/HttpJsonClient.cs`
- `src/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/HttpJsonClient/HttpRequestResult.cs`
- `src/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/HttpJsonClient/HttpJsonClientExtensions.cs`
- `src/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/ClientInfo.cs`
