Dart
Dart
Akeneo: Delete Product
See more HTTP Misc Examples
Demonstrates how to delete product.Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
final http = CkHttp();
// Use your previously obtained access token.
// See Get Akeneo Access Token
http.authToken = 'access_token';
http.setUrlVar('productCode', '123');
final String respStr;
try {
respStr = http.quickDeleteStr('http://pim.my-akeneo-site.com/api/rest/v1/products/{\$productCode}');
} on ChilkatException catch (e) {
print(http.lastHeader);
print(e.lastErrorText);
return;
}
print('Response Status Code: ${http.lastStatus}');
print('Response Body: $respStr');
}