Auth - Api rest Wordpress

0

You will see I am studying how the wordpress application works but according to the documentation. To create, edit and delete a publication it is necessary to do an auth and give the following code in jQuery:

    $.ajax( {
    url: wpApiSettings.root + 'wp/v2/posts/1',
    method: 'POST',
    beforeSend: function ( xhr ) {
        xhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce );
    },
    data:{
        'title' : 'Hello Moon'
    }
 } ).done( function ( response ) {
    console.log( response );
 } );

My question is: How is the auth really working and how could that be translated to some other framework such as "Vue.js"? In advance, thank you very much.

    
asked by Laitochris 28.04.2018 в 19:16
source

0 answers