From b64f3df6354fd51e5f73ddb42e7ca64a78cbfa7b Mon Sep 17 00:00:00 2001 From: Marco Eidinger Date: Wed, 19 Jan 2022 17:14:58 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20diagram=20in=20browser=20?= =?UTF-8?q?not=20shown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit script in browser contained incorrectly: type=png&plantuml= --- Sources/SwiftPlantUMLFramework/PlantUMLScript.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/SwiftPlantUMLFramework/PlantUMLScript.swift b/Sources/SwiftPlantUMLFramework/PlantUMLScript.swift index 7b8cfe4..9072b45 100644 --- a/Sources/SwiftPlantUMLFramework/PlantUMLScript.swift +++ b/Sources/SwiftPlantUMLFramework/PlantUMLScript.swift @@ -57,7 +57,8 @@ public struct PlantUMLScript { func encodedText(completionHandler: @escaping (Result) -> Void) { let escapedScript = text.stringByAddingPercentEncodingForFormData(plusForSpace: true) ?? "" - let parameters = "type=png&plantuml=\(escapedScript)" + // server expectation for parameters changed early 2022 + let parameters = "\(escapedScript)" let postData = parameters.data(using: .utf8) var request = URLRequest(url: URL(string: "https://www.planttext.com/api/scripting")!, timeoutInterval: Double.infinity)