fastapi-rtk 0.2.37 → 0.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ const utils = require("fastapi-rtk/utils");
4
4
  const formCreateItem = async (path, data, options) => {
5
5
  const formData = utils.convertToFormData(data);
6
6
  const { fetchPath, options: fetchOptions } = utils.createFetchParams({ path: utils.urlJoin(path, "/"), method: "POST", options });
7
- fetchOptions["headers"]["Content-Type"] = void 0;
7
+ delete fetchOptions["headers"]["Content-Type"];
8
8
  fetchOptions["body"] = formData;
9
9
  const response = await fetch(fetchPath, fetchOptions);
10
10
  return await utils.parseResponse(response);
@@ -8,7 +8,7 @@ const formUpdateItem = async (path, id, data, options) => {
8
8
  method: "PUT",
9
9
  options
10
10
  });
11
- fetchOptions["headers"]["Content-Type"] = void 0;
11
+ delete fetchOptions["headers"]["Content-Type"];
12
12
  fetchOptions["body"] = formData;
13
13
  const response = await fetch(fetchPath, fetchOptions);
14
14
  return await utils.parseResponse(response);
@@ -2,7 +2,7 @@ import { convertToFormData, createFetchParams, urlJoin, parseResponse } from "fa
2
2
  const formCreateItem = async (path, data, options) => {
3
3
  const formData = convertToFormData(data);
4
4
  const { fetchPath, options: fetchOptions } = createFetchParams({ path: urlJoin(path, "/"), method: "POST", options });
5
- fetchOptions["headers"]["Content-Type"] = void 0;
5
+ delete fetchOptions["headers"]["Content-Type"];
6
6
  fetchOptions["body"] = formData;
7
7
  const response = await fetch(fetchPath, fetchOptions);
8
8
  return await parseResponse(response);
@@ -6,7 +6,7 @@ const formUpdateItem = async (path, id, data, options) => {
6
6
  method: "PUT",
7
7
  options
8
8
  });
9
- fetchOptions["headers"]["Content-Type"] = void 0;
9
+ delete fetchOptions["headers"]["Content-Type"];
10
10
  fetchOptions["body"] = formData;
11
11
  const response = await fetch(fetchPath, fetchOptions);
12
12
  return await parseResponse(response);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastapi-rtk",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "private": false,
5
5
  "description": "A React component library for FastAPI in combination with FastAPI React Toolkit backend, built with Mantine, JsonForms, and Zustand.",
6
6
  "license": "MIT",