Commit Graph

11 Commits

Author SHA1 Message Date
John Blackbourn cda19de292 Docs: Fix and improve inline documentation for the HTTP API.
See #47110


git-svn-id: https://develop.svn.wordpress.org/trunk@46468 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-12 18:03:22 +00:00
John Blackbourn 86b0faf219 Docs: Miscellaneous inline docs corrections and improvements.
See #47110 


git-svn-id: https://develop.svn.wordpress.org/trunk@46424 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-07 19:06:41 +00:00
Gary Pendergast 3652d05fcf HTTP: Add support for the `host-only` flag to `Wp_Http_Cookie`.
Props soulseekah.
Fixes #43231.


git-svn-id: https://develop.svn.wordpress.org/trunk@45135 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-08 05:31:35 +00:00
Gary Pendergast 8f95800d52 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Drew Jaynes b4d81bd654 Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.


git-svn-id: https://develop.svn.wordpress.org/trunk@41162 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 00:40:27 +00:00
Dion Hulse b03af1ee40 HTTP: Document that the return value of `wp_remote_retrieve_headers()` changed from a simple array to an object which implements ArrayAccess.
Props mrahmadawais, sudar, swissspidy.
Fixes #37722


git-svn-id: https://develop.svn.wordpress.org/trunk@38730 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 03:50:54 +00:00
Dominik Schilling 24f890045c HTTP API: Normalize cookies before passing them to Requests.
Requests has its own cookie object in form of `Requests_Cookie`. Therefore we have to convert `WP_Http_Cookie` objects to `Requests_Cookie`.
This introduces `WP_Http_Cookie::get_attributes()` to retrieve cookie attributes of a `WP_Http_Cookie` object and `WP_Http::normalize_cookies()` to convert the cookie objects.

Fixes #37437.

git-svn-id: https://develop.svn.wordpress.org/trunk@38164 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 15:31:48 +00:00
Drew Jaynes dd49a0512b Docs: Add missing inline documentation in `WP_HTTP_Requests_Response`.
* Adds a missing file header
* Adjusts class DocBlock
* Adds missing version and access information for all methods

See #37318, [37428] and #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@38120 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:33:11 +00:00
Ryan McCue 194c8d0e33 HTTP API: Switch back to returning an array.
The array-compatibility object we started returning in r37428 unfortunately isn't enough like an array. In particular, `is_array()` checks fail, despite the object implementing ArrayAccess. Mea culpa.

This moves the WP_HTTP_Response object to a new http_response key in the array, and changes the value back to an actual array.

Fixes #37097.
See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37989 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 17:50:44 +00:00
Drew Jaynes 195572596b Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.


git-svn-id: https://develop.svn.wordpress.org/trunk@37431 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 18:40:19 +00:00
Ryan McCue 9074e9f93b HTTP API: Replace internals with Requests library.
Requests is a library very similar to WP_HTTP, with a high level of unit test coverage, and has a common lineage and development team. It also supports parallel requests.

See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37428 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 04:41:45 +00:00