metafacture / metafacture-fix

Work in progress towards an implementation of the Fix language for Metafacture
Apache License 2.0
6 stars 2 forks source link

Use HTTP POST for data in web UI #8

Closed fsteeg closed 4 years ago

fsteeg commented 4 years ago

https://github.com/metafacture/metafacture-fix/blob/603cf445644ce521ada2670530d30a9434faa93d/org.metafacture.fix.parent/org.metafacture.fix.web/src/main/webapp/index.html#L47

fsteeg commented 4 years ago

Deployed support for larger input using POST to http://test.lobid.org/fix/:

acka47 commented 4 years ago

Could I also post this via curl? Could you provide me with the command?

acka47 commented 4 years ago

Regarding the actual behaviour: It is working without problems in Firefox but not in Chromium (Version 79.0.3945.79 (Official Build) Built on Ubuntu , running on LinuxMint 18.1 (64-bit)). It seems to have problems with the big slice of text in the "data" field and won't process.

acka47 commented 4 years ago

Regarding the actual behaviour: It is working without problems in Firefox but not in Chromium

For now it would be ok for me if it only runs in Firefox as the UI is transitional anyway.

fsteeg commented 4 years ago

Could I also post this via curl? Could you provide me with the command?

This is what works right now:

curl -X POST --data-urlencode 'flux=html-to-xml|decode-xml|handle-generic-xml("html")|fix|encode-json(prettyPrinting="true")' --data-urlencode 'fix=map(_else)' --data-urlencode 'data=<p class="header">hi</p>' http://test.lobid.org/fix/xtext-service/run

If we actually want to post JSON data (as we discussed offline recently), we should open a new issue.

For now it would be ok for me if it only runs in Firefox as the UI is transitional anyway.

Plus, after implementing https://github.com/metafacture/metafacture-fix/issues/6, we could use input URLs in the UI instead of pasting data.

acka47 commented 4 years ago

+1