Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#33711 closed enhancement (fixed)

Introduce HTTP API response cookie functions

Reported by: johnbillion Owned by: wonderboymusic
Priority: normal Milestone: 4.4
Component: HTTP API Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

We have several HTTP API helper functions for retrieving the response code, body, and headers, but none for the cookies or an individual cookie.

Let's introduce:

  • array wp_remote_retrieve_cookies( $response )
  • WP_Http_Cookie wp_remote_retrieve_cookie( $response, $cookie )
  • string wp_remote_retrieve_cookie_value( $response, $cookie )

Attachments (1)

33711.patch​ (3.1 KB ) - added by johnbillion 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @johnbillion
11 years ago

  • Keywords has-patch added

#2 @johnbillion
11 years ago

  • Milestone Future Release → 4.4

#3 @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → closed

In 34369:

HTTP: Add some new Cookie helper functions:

  • wp_remote_retrieve_cookies( $response )
  • wp_remote_retrieve_cookie( $response, $name )
  • wp_remote_retrieve_cookie_value( $response, $name )

Adds unit tests.

Props johnbillion.
Fixes #33711.

Note: See TracTickets for help on using tickets.