Skip to content

@shopware/[email protected]

Compare
Choose a tag to compare
@github-actions github-actions released this 04 Nov 11:33
· 8 commits to main since this release

Minor Changes

  • #1371 0643174 Thanks @patzick! - New onDefaultHeaderChanged hook in store and admin client. This allows to track the default headers changes. Additionally manual change of the default header will also invoke this hook.

Patch Changes

  • #1365 6abe9ab Thanks @patzick! - Updated default API schema definitions to 6.6.6.0

  • #1339 266bb32 Thanks @mdanilowicz! - Updated default schema to version 6.6.6.0

  • #1405 f9fb243 Thanks @patzick! - updated default API schema definitions

  • #1316 15bebee Thanks @mkucmus! - Extend Criteria type in exported admin API schema

  • #1323 ebb10eb Thanks @mkucmus! - Don't send Content-Type in case of multipart/form-data.

    • Ignore Content-Type header in browser context when multipart/form-data is set.
    • boundary is set by a browser automatically.
    // example
    
    const formData = new FormData();
    formData.append("file", file);
    const addedMediaResponse = await apiClient.invoke(
      "uploadImage post /images/upload",
      {
        headers: {
          "Content-Type": "multipart/form-data", // <-- set this one
        },
        accept: "application/json",
        body: formData,
      },
    );

    When invoke method of api-client gets the headers parameter containing multipart/form-data Content-Type - the header will be ignored and the responsibility will be handed over to the browser - so the Content-Type=multipart/form-data header will eventually be sent, but including a dynamic boundary params added by the browser on the fly.