Title: WP_Http_Curl::stream_headers
Published: April 25, 2014
Last modified: February 24, 2026

---

# WP_Http_Curl::stream_headers( resource $handle, string $headers ): int

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Grabs the headers of the cURL request.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#description)󠁿

Each header is sent individually to this callback, and is appended to the `$header`
property for temporary storage.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#parameters)󠁿

 `$handle`resourcerequired

cURL handle.

`$headers`stringrequired

cURL request headers.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#return)󠁿

 int Length of the request headers.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#source)󠁿

    ```php
    private function stream_headers( $handle, $headers ) {
    	$this->headers .= $headers;
    	return strlen( $headers );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-http-curl.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-http-curl.php#L373)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-http-curl.php#L373-L376)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_http_curl/stream_headers/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.2.0](https://developer.wordpress.org/reference/since/3.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_http_curl%2Fstream_headers%2F)
before being able to contribute a note or feedback.