# System.Web.Http

**Kind:** Service

**Source:** `Pams/Logic/Pams.Business/Pams.Business.csproj` (line 1)

**Part of:** [Pams](subsystem-pams)

NuGet package dependency

`System.Web.Http` is a NuGet package dependency declared in `Pams.Business.csproj`. It supplies ASP.NET Web API types used by the legacy Pams business project to define HTTP endpoints and process API requests.

## Diagram

```mermaid
flowchart TD
    Client[JavaScript client] --> Api[ASP.NET Web API endpoint]
    Api --> Http[System.Web.Http]
    Http --> Business[Pams.Business]
```

## Usage

```typescript
const response = await fetch("/api/pams/items", {
  method: "GET",
  headers: {
    Accept: "application/json",
  },
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const items = await response.json();
console.log(items);
```

## AI Coding Instructions

- Treat `System.Web.Http` as a dependency of the legacy ASP.NET Web API stack, not as a client-side JavaScript package.
- Add or update API controllers in the project that references `Pams.Business.csproj` and uses `System.Web.Http` types.
- Keep client requests aligned with the routes, HTTP methods, and response contracts exposed by the Web API layer.
- Check package compatibility before changing the project format or replacing `System.Web.Http` with ASP.NET Core APIs.

## Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Injected or called by (3)

- `Pams.API` — `Pams/API/Pams.API/Pams.API.csproj`:1
- `Pams.Core` — `Pams/Core/Pams.Core/Pams.Core.csproj`:1
- `Pams.Business` — `Pams/Logic/Pams.Business/Pams.Business.csproj`:1
