How to send plantuml description to the plantuml server from command line?

0 votes
asked Sep 13, 2021 in Question / help by dragondive (500 points)

I want to use the PlantUML server to generate a diagram from a text file. I want to use only the command line and avoid writing code in another programming language, if possible. As suggested in this question How to curl to plantuml-server - PlantUML Q&A, I tried the following with a standard "Alice -> Bob: hello" diagram:

cat hello.puml |  curl -v -H "Content-Type: text/plain" --data-binary @- http://www.plantuml.com/plantuml/png/ --output - > out.png

But this doesn't generate a valid diagram. What did I miss here? 

1 Answer

0 votes
answered Oct 7, 2021 by chris (2,540 points)
You need to encode your file to match the URL encoding scheme:
https://plantuml.com/text-encoding
...