WP_Http::processResponse

Advertisement

Summery Summery

Parses the responses and splits the parts into headers and body.

Syntax Syntax

WP_Http::processResponse( string $strResponse )

Parameters Parameters

$strResponse

(Required) The full response string.

Return Return

(array) Array with response headers and body.

  • 'headers'
    (string) HTTP response headers.
  • 'body'
    (string) HTTP response body.

Source Source

File: wp-includes/class-http.php

		return array(
			'headers' => $res[0],
			'body'    => isset( $res[1] ) ? $res[1] : '',
		);
	}

	/**
	 * Transforms header string into an array.

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply