wp_remote_retrieve_body()
wp_remote_retrieve_body( array|WP_Error $response ) 只从原…
wp_remote_retrieve_body( array|WP_Error $response )
只从原始身体中检索响应。
		Retrieve only the body from the raw response.
	
目录锚点:#参数#源码#笔记
参数(Parameters)
| 参数 | 类型 | 说明 | 
|---|---|---|
| $response | (array | WP_Error) | HTTP响应。 | 
源码(Source)
/**
 * Retrieve only the body from the raw response.
 *
 * @since 2.7.0
 *
 * @param array $response HTTP response.
 * @return string The body of the response. Empty string if no body or incorrect parameter given.
 */
function wp_remote_retrieve_body( $response ) {
	if ( is_wp_error($response) || ! isset($response['body']) )
		return '';
	return $response['body'];
}| 更新版本 | 源码位置 | 使用 | 被使用 | 
|---|---|---|---|
| 2.7.0 | wp-includes/http.php | 16 | 5 | 
笔记(Notes)
例子
类别:WordPress 函数手册、 
		本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。







还没有任何评论,赶紧来占个楼吧!