Put the dsl text into Body of POST query ?

40 views
Skip to first unread message

fabrice audouard

unread,
Apr 6, 2020, 5:33:18 AM4/6/20
to yuml
Hi,

Is it possible to put the dsl text of diagram into body of POST query ?
Thx for your answer

Fabrice

Tobin Harris

unread,
Apr 6, 2020, 6:19:59 PM4/6/20
to yuml
Yup, you can set the post parameter dsl_text.

> sudo pip install https://github.com/wandernauta/yuml/zipball/master
> echo "[You]-(Draw Diagrams)" | ./yuml -t usecase -s scruffy -o diagram.png

An old post about it is here.

Yuan Wan

unread,
Apr 6, 2020, 9:43:35 PM4/6/20
to yuml
Hello, Tobin.
    If use POST method. What does the URL look like?

Tobin Harris

unread,
Apr 7, 2020, 5:48:59 PM4/7/20
to yuml
Hi

Here's an example:

curl -X POST -d "dsl_text=[Curl]->[Example]-.-[Nice{bg:wheat}]" https://yuml.me/diagram/scruffy/class/ 


This returns the filename with svg extension - e3c59524.svg


You can then download with whatever extension you like (svg, png, pdf, jpg, json).


curl https://yuml.me/e3c59524.png --output test.png


Hope this helps!


Tobin

Yuan Wan

unread,
Apr 7, 2020, 9:02:48 PM4/7/20
to yuml
Thank you. It's very helpful.

fabrice audouard

unread,
Apr 8, 2020, 4:41:57 AM4/8/20
to yuml
Thank you Tobin. All it's Ok.

Fabrice
Reply all
Reply to author
Forward
0 new messages