Skip to content

Commit

Permalink
Merge pull request #151 from Automattic/add/namespace-support
Browse files Browse the repository at this point in the history
WP-API: Add support for apiNamespace
  • Loading branch information
timmyc authored and jsnajdr committed Jan 27, 2020
1 parent 37bd1a0 commit 9281e58
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/wpcom.js/lib/util/send-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ module.exports = function( params, query, body, fn ) {
params.apiVersion = this.apiVersion;
}

// - `apiNamespace`
if ( query.apiNamespace ) {
params.apiNamespace = query.apiNamespace;
debug( 'apiNamespace: %o', params.apiNamespace );
delete query.apiNamespace;
}

// - `proxyOrigin`
if ( query.proxyOrigin ) {
params.proxyOrigin = query.proxyOrigin;
Expand Down

0 comments on commit 9281e58

Please sign in to comment.