How to use the @wordpress/api-fetch.setNonce function in @wordpress/api-fetch

To help you get started, we’ve selected a few @wordpress/api-fetch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github php4dev / heroku-wordpress / wp-content / plugins / woo-gutenberg-products-block / assets / js / data / shared-controls.js View on Github external
.then( ( response ) => {
							resolve( {
								response,
								headers: fetchResponse.headers,
							} );
							triggerFetch.setNonce( fetchResponse.headers );
						} )
						.catch( () => {