Soup.ServerMessage.set_response

### Method

# Soup ServerMessageset_response

#### Declaration [src]

    void
    soup_server_message_set_response (
      SoupServerMessage* msg,
      const char* content_type,
      SoupMemoryUse resp_use,
      const char* resp_body,
      gsize resp_length
    )

#### Description [src]

Convenience function to set the response body of a `SoupServerMessage`. If `content_type` is `NULL`, the response body must be empty as well.

#### Parameters

`content_type`

  Type: `const char*`

  MIME Content-Type of the body.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`resp_use`

  Type: `SoupMemoryUse`

  A `SoupMemoryUse` describing how to handle `resp_body`.

`resp_body`

  Type: An array of `guint8`

  a data buffer containing the body of the message response.

  The argument can be `NULL`.
  The length of the array is specified in the `resp_length` argument.
  The data is owned by the caller of the method.

`resp_length`

  Type: `gsize`

  The byte length of `resp_body`.