Skip to content

Commit

Permalink
fix: 🐛 diagram in browser not shown
Browse files Browse the repository at this point in the history
script in browser contained incorrectly:
type=png&plantuml=
  • Loading branch information
MarcoEidinger committed Jan 20, 2022
1 parent 516cc45 commit b64f3df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/SwiftPlantUMLFramework/PlantUMLScript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public struct PlantUMLScript {

func encodedText(completionHandler: @escaping (Result<String, NetworkError>) -> 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)
Expand Down

0 comments on commit b64f3df

Please sign in to comment.