---
title: IRequestHelper
summary: API reference for IRequestHelper.
status: draft
owner: SAIF IT Core Services
last_reviewed: 2026-10-12
library: BolMiddleware
reference_type: package
---

# IRequestHelper

Contract for reading context-related values out of the current HTTP request. `RequestHelper` implements it and page models create it per request.

## Purpose
- Find the context id and session id used for context resolution ([BR-BOLMIDDLEWARE-001](../../business-rules.md#br-bolmiddleware-001-web-context-resolution-precedence), [BR-BOLMIDDLEWARE-020](../../business-rules.md#br-bolmiddleware-020-session-identifier-source-selection)).

## Context
- Namespace: `BolMiddleware.Services.Request`
- Assembly/package: `BolMiddleware`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `GetReferringApplication` | `string? GetReferringApplication()` | Identifies the application that sent the user here. |
| `GetContextId` | `string? GetContextId()` | Returns the `WebContextId` form value, otherwise the `cid` query value. |
| `GetSessionId` | `string? GetSessionId()` | Returns the session id. |
| `GetFormValue` | `string? GetFormValue(string key)` | Reads a posted form value. |
| `GetContextFromSession` | `ContextResult? GetContextFromSession()` | Reads the context saved in session. |
| `GetSession` | `ISession GetSession()` | Returns the request session. |

## Behavioral notes
- Instances are not registered in DI.

## Constraints and usage notes
- Valid for one request only.

## Sources
- src/BolMiddleware/Services/Request/IRequestHelper.cs
