Skip to content

System.Net.Http.Primitives

reference
1 min readUpdated

Kind: Service

Source: Pams/Logic/Pams.Email/Pams.Email.csproj (line 1)

Part of: Pams

NuGet package dependency

System.Net.Http.Primitives is a NuGet dependency declared by the Pams.Email project. It provides legacy .NET HTTP primitive types that email-related code can reference when handling HTTP methods, headers, requests, or responses.

Diagram

mermaid
sequenceDiagram
    participant Client
    participant EmailApi as Pams.Email API
    participant HttpPrimitives as System.Net.Http.Primitives

    Client->>EmailApi: Send HTTP request
    EmailApi->>HttpPrimitives: Read HTTP method and headers
    HttpPrimitives-->>EmailApi: HTTP primitive values
    EmailApi-->>Client: Return HTTP response

Usage

ts
async function sendEmailRequest() {
  const response = await fetch("/api/email/send", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      to: "user@example.com",
      subject: "Status update",
      body: "Your request has been received.",
    }),
  });

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

  return response.json();
}

AI Coding Instructions

  • Treat this package as a .NET project dependency; do not import it directly from TypeScript or browser code.
  • Keep HTTP request and response handling in the Pams.Email server-side integration layer.
  • Check existing package references before replacing this legacy-format dependency with newer HTTP libraries.
  • Preserve current HTTP header and method behavior when changing code that references types from this package.

Was this page helpful?

Download as PDF