Created
October 3, 2018 06:42
-
-
Save phpbits/28c01b89abb43cf403f3acb32fb78795 to your computer and use it in GitHub Desktop.
Using wp.apiRequest to access custom endpoints.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp.apiRequest( { path: '/phpbits/test-blocks/v1/user-roles/' } ) | |
.then( | |
( obj ) => { | |
console.log( obj ); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment