# Class ActorHandleRaw

Provides underlying functions for stateless ActorHandle for action calls. Similar to ActorConnRaw but doesn't maintain a connection.

#### See

ActorHandle

- Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-handle.ts:40

##### Index

### Constructors

constructor

### Methods

action
connect
fetch
resolve
websocket

## Constructors

### constructor

- new ActorHandleRaw(
  client: any,
  driver: ManagerDriver,
  params: unknown,
  encoding: "json" | "cbor" | "bare",
  actorQuery:
  | { getForId: { actorId: string; name: string } }
  | { getForKey: { key: string[]; name: string } }
  | {
  getOrCreateForKey: {
  input?: unknown;
  key: string[];
  name: string;
  region?: string;
  };
  }
  | {
  create: {
  input?: unknown;
  key: string[];
  name: string;
  region?: string;
  };
  },
  ): ActorHandleRaw
  `Protected`

  Do not call this directly.

  Creates an instance of ActorHandleRaw.

  #### Parameters

  - client: any
  - driver: ManagerDriver
  - params: unknown
  - encoding: "json" | "cbor" | "bare"
  - actorQuery:
    | { getForId: { actorId: string; name: string } }
    | { getForKey: { key: string[]; name: string } }
    | {
    getOrCreateForKey: {
    input?: unknown;
    key: string[];
    name: string;
    region?: string;
    };
    }
    | {
    create: {
    input?: unknown;
    key: string[];
    name: string;
    region?: string;
    };
    }

  #### Returns ActorHandleRaw

  - Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-handle.ts:54

## Methods

### action

- action<Args extends unknown[] = unknown[], Response = unknown>(
  opts: { args: Args; name: string; signal?: AbortSignal },
  ): Promise<Response>

  Call a raw action. This method sends an HTTP request to invoke the named action.

  #### Type Parameters

  - Args extends unknown[] = unknown[]

    The type of arguments to pass to the action function.

  - Response = unknown

    The type of the response returned by the action function.

  #### Parameters

  - opts: { args: Args; name: string; signal?: AbortSignal }

  #### Returns Promise<Response>

  #### See

  ActorHandle

  - Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-handle.ts:75

### connect

- connect(): ActorConn<AnyActorDefinition>

  Establishes a persistent connection to the actor.

  #### Returns ActorConn<AnyActorDefinition>

  A connection to the actor.

  - Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-handle.ts:169

### fetch

- fetch(input: string | Request | URL, init?: RequestInit): Promise<Response>

  Makes a raw HTTP request to the actor.

  #### Parameters

  - input: string | Request | URL

    The URL, path, or Request object

  - `Optional` init: RequestInit

    Standard fetch RequestInit options

  #### Returns Promise<Response>

  Promise - The raw HTTP response

  - Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-handle.ts:195

### resolve

- resolve(__namedParameters?: { signal?: AbortSignal }): Promise<string>

  Resolves the actor to get its unique actor ID

  #### Parameters

  - __namedParameters: { signal?: AbortSignal } = {}

  #### Returns Promise<string>

  - A promise that resolves to the actor's ID
  - Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-handle.ts:233

### websocket

- websocket(path?: string, protocols?: string | string[]): Promise<WebSocket>

  Creates a raw WebSocket connection to the actor.

  #### Parameters

  - `Optional` path: string

    The path for the WebSocket connection (e.g., "stream")

  - `Optional` protocols: string | string[]

    Optional WebSocket subprotocols

  #### Returns Promise<WebSocket>

  WebSocket - A raw WebSocket connection

  - Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-handle.ts:215