> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kynesys.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Web2

> The Web2 proxy system allows you to make HTTP requests through the Demos network. Requests are verified by a network of attestation nodes, ensuring da...

# Web2

### What is Web2 Proxy?

The Web2 proxy system allows you to make HTTP requests through the Demos network. Requests are verified by a network of attestation nodes, ensuring data integrity and reliability. The system provides:

* Secure proxy requests through the Demos network
* Session-based request handling
* Support for all standard HTTP methods
* Custom header and payload support

### Basic Example

```typescript theme={null}
import { Demos } from "@kynesyslabs/demosdk/websdk"

// Connect to demos and set up identity
const demos = new Demos()
await demos.connect("http://localhost:53550")
await demos.connectWallet(mnemonic)

// Create and use proxy
const dahr = await demos.web2.createDahr()
const response = await dahr.startProxy({
    url: "https://api.example.com",
    method: "GET",
})
```

### Key Features

* Session Management: Each proxy request is handled through a dedicated session
* Method Support: GET, POST, PUT, PATCH, DELETE
* Custom Headers: Add your own headers to requests
* Payload Support: Send data with your requests
* Authorization: Include authorization tokens when needed

### Choosing Between DAHR and TLSNotary

The Demos Web2 system offers two complementary methods for web attestation:

<CardGroup cols={2}>
  <Card title="DAHR" icon="rocket" href="/sdk/web2/dahr-api-reference/overview">
    **Fast proxied requests** with hash attestation. Best for general API calls where speed matters. Response hashes are stored on-chain.
  </Card>

  <Card title="TLSNotary" icon="shield-check" href="/sdk/web2/tlsnotary/overview">
    **Cryptographic proofs** from TLS sessions. Best for confidential data requiring verifiable attestation with selective disclosure.
  </Card>
</CardGroup>

| Feature  | DAHR             | TLSNotary               |
| -------- | ---------------- | ----------------------- |
| Speed    | \~500ms          | 2-5s                    |
| Cost     | Gas only         | 1+ DEM + gas            |
| Privacy  | Hash attestation | Zero-knowledge possible |
| Best for | General APIs     | Confidential data       |
