Skip to content

Commit

Permalink
Merge pull request #218 from bigcommerce/STRF-12475
Browse files Browse the repository at this point in the history
STRF-12475: Add postFormData for cart.php to stencil-utils
  • Loading branch information
jordanarldt authored Dec 17, 2024
2 parents d993ddc + 5a9949a commit ef1d7de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/api/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ export default class extends Base {
this.remoteRequest('/cart/update', 'POST', { params: payload }, callback);
}

/**
* POST form data to /cart.php
*
* @param {FormData} formData
* @param {Function} callback
*/
postFormData(formData, callback) {
this.makeRequest('/cart.php', 'POST', { formData }, false, callback);
}

/**
* Get cart content
*
Expand Down

0 comments on commit ef1d7de

Please sign in to comment.