@readme/httpsnippet 10.0.4 → 10.0.5
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.
- package/dist/{chunk-CSDAGXA2.js → chunk-QBICEG2V.js} +4 -4
- package/dist/{chunk-CSDAGXA2.js.map → chunk-QBICEG2V.js.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/targets/index.cjs +3 -3
- package/dist/targets/index.cjs.map +1 -1
- package/dist/targets/index.js +1 -1
- package/package.json +1 -1
|
@@ -3253,7 +3253,7 @@ var urlsession = {
|
|
|
3253
3253
|
break;
|
|
3254
3254
|
case "application/json":
|
|
3255
3255
|
if (postData.jsonObj) {
|
|
3256
|
-
push(`${literalDeclaration("parameters", postData.jsonObj, opts)} as [String : Any]`);
|
|
3256
|
+
push(`${literalDeclaration("parameters", postData.jsonObj, opts)} as [String : Any?]`);
|
|
3257
3257
|
blank();
|
|
3258
3258
|
push("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])");
|
|
3259
3259
|
blank();
|
|
@@ -3270,7 +3270,7 @@ var urlsession = {
|
|
|
3270
3270
|
push('body += "--\\(boundary)\\r\\n"', 1);
|
|
3271
3271
|
push('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1);
|
|
3272
3272
|
push('if let filename = param["fileName"] {', 1);
|
|
3273
|
-
push('let contentType = param["
|
|
3273
|
+
push('let contentType = param["contentType"]!', 2);
|
|
3274
3274
|
push("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2);
|
|
3275
3275
|
push('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2);
|
|
3276
3276
|
push('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2);
|
|
@@ -3323,7 +3323,7 @@ var urlsession = {
|
|
|
3323
3323
|
push("request.httpBody = postData");
|
|
3324
3324
|
}
|
|
3325
3325
|
blank();
|
|
3326
|
-
push("let (data,
|
|
3326
|
+
push("let (data, _) = try await URLSession.shared.data(for: request)");
|
|
3327
3327
|
push("print(String(decoding: data, as: UTF8.self))");
|
|
3328
3328
|
return join();
|
|
3329
3329
|
}
|
|
@@ -3456,4 +3456,4 @@ var addTargetClient = (targetId, client) => {
|
|
|
3456
3456
|
|
|
3457
3457
|
export { addClientPlugin, addTarget, addTargetClient, getHeaderName, isClient, isTarget, targets };
|
|
3458
3458
|
//# sourceMappingURL=out.js.map
|
|
3459
|
-
//# sourceMappingURL=chunk-
|
|
3459
|
+
//# sourceMappingURL=chunk-QBICEG2V.js.map
|