using http-client to execute an html form
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
New
|
Medium
|
Matthias Brantner |
Bug Description
I was implementing some XQuery code for uploading a file and some form data. Fiddling with Multipart request and the http-client wasn't really usable, the http-client added some extra multipart content-type header and didn't work well. In the end I was implementing multipart requests manually:
<http:body media-type=
concat (
' filename=
"A test file ",
)
}</http:body>
As this is not usable for common users, I propose 2 changes:
1. the multipart implementation of the http client can be done in XQuery only (see example above) which would make this implementation more stable
2. a helper module where one just passes an html form and gets an http request for execution, for example:
http-client:
html-
<form action="http://
<input name="file" type="file" value="{$filename}" />
<input name="description" type="text" value="A test file">
<input name="category" type="text" value="main">
</form>
)
)