React Native
React Native
Akeneo: Delete Product
See more HTTP Misc Examples
Demonstrates how to delete product.Chilkat React Native Downloads
import { Http } from '@chilkat/react-native'
async function chilkatExample() {
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
const http = new Http();
// Use your previously obtained access token.
// See Get Akeneo Access Token
http.authToken = 'access_token';
http.setUrlVar('productCode', '123');
let respStr: string;
try {
respStr = await http.quickDeleteStrAsync('http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}');
} catch {
console.log(http.lastHeader);
console.log(http.lastErrorText);
return;
}
console.log(`Response Status Code: ${http.lastStatus}`);
console.log(`Response Body: ${respStr}`);
}