package
Proxied cookie-authenticated REST API requests to WordPress.com.
npm install wpcom-proxy-requestGitHub-flavored package documentation.
Across all versions, last 30 days.
10,381 in 30 days
Runtime metadata.
Tagged topics.
yuliyan
yuliyan.slavchev@gmail.com
a8c
invoices@automattic.com
blowery
ben@blowery.org
ehg_
chris@ehg.sh
sgomes
mail@sgomes.io
tyxla
tyxla@abv.bg
saroshaga
sarosh.aga@automattic.com
nejclovrencic
nejc.lovrencic@gmail.com
sirbrillig
payton@foolord.com
chriszarate
chris@zarate.org
robersongomes
robersonccgomes@gmail.com
johngodley
johng75@gmail.com
jeherve
jeremy@tagada.hu
daledupreez-a8c
dale@automattic.com
t2dw4t
todd.wright@automattic.com
luismulinari
luis.mulinari@gmail.com
andrea-sdl
andrea.grassi@automattic.com
elazzabi
elazzabi.ahmed@gmail.com
fmfernandes
fernando.fernandes@automattic.com
sirreal
jon.surrell@gmail.com
wwa
volodymyr@wildwolf.name
chihsuan
chihsuan.tw@gmail.com
manzoorwanijk
manzoorwani.jk@gmail.com
msurdi-a8c
matias.emanuel.surdi@automattic.com
newspack-npm
newspack@a8c.com
dsmartg
derek.smart@automattic.com
kthai15
kavin.keratikasama@automattic.com
bgrgicak
berislav.grgicak@gmail.com
robertsreberski_a8c
robert.sreberski@automattic.com
artpi
artur.piszek@gmail.com
gmjuhasz
jugergo@gmail.com
borkweb
borkweb@gmail.com
kat3samsin
kat3samsin@gmail.com
brunobasto
b.basto@gmail.com
dhenridev
douglas.henri@automattic.com
mrmurphy
m@mrmurphy.dev
wpvip-bot
platform+npm@wpvip.com
etobiesen
e.tobiesen@gmail.com
alshakero
omar@omaralshaker.com
arthur791004
arthur791004@gmail.com
dilirity
peter.petrov89@gmail.com
anandnalya
anand.nalya@gmail.com
arcangelinis
anthony.arcangelini@gmail.com
retrofox
rdsuarez@gmail.com
iamchughmayank
mayank.chugh@automattic.com
simison
mikael@ihminen.org
fredrikekelund
fredrik@fredrik.computer
griffithchen
griffith.chen@automattic.com
mdawaffe
michael.d.adams@gmail.com
jboland8
josh.boland@automattic.com
chriskmnds
chriskmnds@gmail.com
oandregal
ola@oandre.gal
galatanovidiu
galatanovidiu@gmail.com
kangzj
kangzjnet@gmail.com
_mirka_
lena@jaguchi.com
aduth
andrew@andrewduthie.com
ebuccelli
emanuele.buccelli@automattic.com
nylen
jnylen@gmail.com
timmyc
timmydcrawford@gmail.com
gwwar
kerryliu@gmail.com
tug
dekervit@gmail.com
skeltoac
skeltoac@gmail.com
dmsnell
dennis.snell@automattic.com
jsnajdr
jsnajdr@gmail.com
Estimated unpacked size across 8 packages.
231.9 kB
Includes dependencies.
3 direct · 1 outdated
Proxied cookie-authenticated REST-API and WP-API requests to WordPress.com
You likely want to use the high-level APIs in wpcom.js
instead of using this module directly.
This module offers access to the WordPress.com REST-API and WP-API via a proxying <iframe>
pointing to a special URL that proxies API requests on the host page's behalf.
It is intended to be used in the browser (client-side) via a bundler like browserify or webpack.
Install wpcom-proxy-request using npm:
npm install wpcom-proxy-request// Import wpcom-proxy-request handler
import proxy from 'wpcom-proxy-request';
proxy( { path: '/me' }, function ( err, body, headers ) {
if ( err ) {
throw err;
}
const div = document.createElement( 'div' );
div.innerHTML = 'Your WordPress.com "username" is: <b>@' + res.username + '</b>';
document.body.appendChild( div );
} );Compile and watch client-test application
make watch-test-appRun server
make run-test-appOpen a tab pointing to http://calypso.localhost:3001/
MIT – Copyright Automattic 2014