---
updatedAt: 2025-07-15T08:13:49.000Z
agentTools:
  projectIndex: https://docs.appery.io/llms.txt
---

# Response

Response API.

Used as a response (answer) for the request.

# Methods

**Response** has the following parameters:

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Method
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        success()
      </td>

      <td>
        Returns successful response without body.
      </td>
    </tr>

    <tr>
      <td>
        success(body)
      </td>

      <td>
        Returns successful response with specified body.
      </td>
    </tr>

    <tr>
      <td>
        success(body, mimeType)
      </td>

      <td>
        Returns successful response with specified body and MIME type.
      </td>
    </tr>

    <tr>
      <td>
        binary(body)
      </td>

      <td>
        Returns successful response with binary data in body and MIME type “application/octet-stream.”
      </td>
    </tr>

    <tr>
      <td>
        binary(body, mimeType)
      </td>

      <td>
        Returns successful response with binary data in body and specified MIME type.
      </td>
    </tr>

    <tr>
      <td>
        redirect(url)
      </td>

      <td>
        Returns redirect response with specified location URL.
      </td>
    </tr>

    <tr>
      <td>
        error(body)
      </td>

      <td>
        Returns error response with specified body and error code (response status).
      </td>
    </tr>

    <tr>
      <td>
        setHeader(name, value)
      </td>

      <td>
        Sets specified header value.
      </td>
    </tr>
  </tbody>
</Table>