Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Latest commit

 

History

History
27 lines (15 loc) · 516 Bytes

wpcom.req.md

File metadata and controls

27 lines (15 loc) · 516 Bytes

WPCOM#Req

WPCOM.Req.get(params, query, fn)

Make a GET request directly to WordPress.com REST-API

// get sites list of current user
wpcom.req.get('/me/sites', function(err, data){
	// data response
})

WPCOM.Req.post(params, query, body, fn)

Make a POST request directly to WordPress.com REST-API

WPCOM.Req.put(params, query, body, fn)

It's an alias of WPCOM.Req.Post();

WPCOM.Req.del(params, query, fn)

It's an alias of WPCOM.Req.Post() without passing body argument;