Skip to content

Conversation

@kadamwhite
Copy link
Collaborator

This follows #220 by providing a method by which transport functions can be set on a preexisting WP instance object, such as one returned through the auto-discovery flow. Documentation around HTTP behavior customization and extension has been added to the README.

…ization

This follows #220 by providing a method by which transport functions can
be set on a preexisting `WP` instance object, such as one returned through
the auto-discovery flow. Documentation around HTTP behavior customization
and extension has been added to the README.
@kadamwhite kadamwhite force-pushed the implement-and-document-wp-instance-transport-method branch from 9d22bab to 45ee6ec Compare September 13, 2016 18:38
@kadamwhite kadamwhite merged commit 45ee6ec into master Sep 13, 2016
@kadamwhite kadamwhite deleted the implement-and-document-wp-instance-transport-method branch September 13, 2016 19:44
kadamwhite added a commit that referenced this pull request Dec 5, 2016
In #181 auto-discovery was added that permits a consumer of this library
to automatically locate the API root for a given WordPress site (specified
by URL), and in most cases to automatically detect & initialize specific
route handlers for the API routes available on that site.

However, these methods were never updated to account for #221, which
added the ability to replace the default HTTP transport (superagent)
with a custom implementation or a wrapper. This meant that even if
the consumer had specified their own transport, for example jQuery,
there would still be a dependency on superagent should they wish to
use the auto-discovery capabilities of the library.

This PR updates the auto-discovery logic to use the same HTTP transport
layer as the rest of the client, which has the added benefit of removing
a number of duplicative logic that existed in the auto-discovery module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants