# data

> (Read Only) The raw data to pass as the POST request body when sending the form.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.UnityWebRequestModule

```csharp
public byte[] data { get; }
```

### Remarks

Usually, you just pass the WWWForm object directly to the [WWW](/engine/6000.0/script-reference/unityengine/www.md) constructor, but you will need this variable if you want to change the request headers sent to the web server.

Additional Resources: [WWWForm.headers](/engine/6000.0/script-reference/unityengine/wwwform/headers.md) variable.

### Examples

```csharp
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ExampleClass : MonoBehaviour
{
    IEnumerator Start()
    {
        WWWForm form = new WWWForm();
        form.AddField( "name", "value" );
        Dictionary<string, string> headers = form.headers;
        byte[] rawData = form.data;
        string url = "www.myurl.com";

        // Add a custom header to the request.
        // In this case a basic authentication to access a password protected resource.
        headers["Authorization"] = "Basic " + System.Convert.ToBase64String(
            System.Text.Encoding.ASCII.GetBytes("username:password"));

        // Post a request to an URL with our custom headers
        using (WWW www = new WWW(url, rawData, headers))
        {
            yield return www;
            //.. process results from WWW request here...
        }
    }
}
```
