@rest-vir/define-service 0.8.0 → 0.8.1

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.
@@ -99,7 +99,11 @@ export function buildEndpointRequestInit(endpoint, ...[{ method, options = {}, p
99
99
  const hasContentTypeHeader = Object.keys(headers).some((headerKey) => headerKey.toLowerCase() === 'content-type');
100
100
  if (!hasContentTypeHeader) {
101
101
  if (requestData instanceof FormData) {
102
- headers['content-type'] = 'multipart/form-data';
102
+ /**
103
+ * Do not set `content-type` manually when submitting form data because the browser will
104
+ * set it automatically _and_ include a boundary in the content type, which is needed
105
+ * for reading the form data properly.
106
+ */
103
107
  }
104
108
  else if (check.isObject(requestData)) {
105
109
  headers['content-type'] = 'application/json';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rest-vir/define-service",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Define an connect to a declarative and type safe REST and WebSocket service.",
5
5
  "keywords": [
6
6
  "rest",