---
title: Http
description: Http protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

<Callout type="info">
**Source:** `packages/spec/src/ui/http.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { HttpMethod, HttpRequest } from '@objectstack/spec/ui';
import type { HttpMethod, HttpRequest } from '@objectstack/spec/ui';

// Validate data
const result = HttpMethod.parse(data);
```

---

## HttpMethod

### Allowed Values

* `GET`
* `POST`
* `PUT`
* `PATCH`
* `DELETE`


---

## HttpRequest

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **url** | `string` | ✅ | API endpoint URL |
| **method** | `Enum<'GET' \| 'POST' \| 'PUT' \| 'PATCH' \| 'DELETE'>` | ✅ | HTTP method |
| **headers** | `Record<string, string>` | optional | Custom HTTP headers |
| **params** | `Record<string, any>` | optional | Query parameters |
| **body** | `any` | optional | Request body for POST/PUT/PATCH |


---

