From 9281e589448e51fff3ebc1f93d8153d175ef036b Mon Sep 17 00:00:00 2001 From: Timmy Crawford Date: Tue, 16 Feb 2016 09:47:21 -0800 Subject: [PATCH] Merge pull request #151 from Automattic/add/namespace-support WP-API: Add support for apiNamespace --- packages/wpcom.js/lib/util/send-request.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/wpcom.js/lib/util/send-request.js b/packages/wpcom.js/lib/util/send-request.js index a51e629b3167a..1a599fdeba48d 100644 --- a/packages/wpcom.js/lib/util/send-request.js +++ b/packages/wpcom.js/lib/util/send-request.js @@ -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;