@prismatic-io/spectral 6.5.1 → 6.5.2
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.
|
@@ -130,7 +130,9 @@ const sendRawRequest = (baseUrl, values, authorizationHeaders = {}) => __awaiter
|
|
|
130
130
|
if (values.data && (!(0, lodash_1.isEmpty)(values.formData) || !(0, lodash_1.isEmpty)(values.fileData))) {
|
|
131
131
|
throw new Error("Cannot specify both Data and File/Form Data.");
|
|
132
132
|
}
|
|
133
|
-
const payload = values.
|
|
133
|
+
const payload = !(0, lodash_1.isEmpty)(values.formData) || !(0, lodash_1.isEmpty)(values.fileData)
|
|
134
|
+
? toFormData(values.formData, values.fileData)
|
|
135
|
+
: values.data;
|
|
134
136
|
const client = (0, exports.createClient)({
|
|
135
137
|
baseUrl,
|
|
136
138
|
debug: values.debugRequest,
|