-
-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add POST support #74
Add POST support #74
Conversation
Many thanks for your contribution. Returning 400 Bad Request status codes in case of syntax error is indeed a good idea. However, it seems that "badRequestOnError" is unused in: Could you remove it from your merge request ? |
Doh - was doing some last minute testing of 400 Bad Request responses for GETs and clearly left it that way when committing - sorry! It does seem that at least Safari is happy to continue showing the PSystemError diagrams even when returned with a 400 status code, and I'd expect other browsers to do the same. I'll remove the parameter as you suggest. Using a 400 makes it much easier for programmatic clients to use common http libraries which then notice the error without needing to understand plantuml specific headers. |
Thanks for your work. Can you tell how do I get second page with http://www.plantuml.com/plantuml/svg/0/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKYX8J4zLCEJAIoq7iR3A6d4vfEQb0FK20000 Does
|
I see, I have to construct a valid I think it's kind of a bug, when I tries post to http://www.plantuml.com/plantuml/svg/1, I can never get the expected result. |
I've never used multiple pages so certainly didn't test it when implementing this feature. Looking at the code though, it appears that so long as a slash is present after the number then the index should be honoured. e.g.
This all comes about due to reusing the same URL parsing pattern as used when processing GET requests - there's room for improvement :) POST does not support compressed diagrams - I assumed compression would be better handled using a filter or proxy implementing HTTP |
@roxspring According to my test, this is the only way to get right result:
I tested with Following are all failed:
You can quickly reproduce with:
and:
Only the last command works as expected, get the 'OK' message within the 2nd page. |
@roxspring Can you take a look at this issue: #125. Many thanks! |
Add POST support plus PSystemError diagrams results generate 400 Bad Request status codes
Add POST support plus PSystemError diagrams results generate 400 Bad Request status codes
Curl example usage:
Addresses #69, #25