Hi Johan,
thanks for replying. I don't know if it's still relevant to you, but…
The main features was authentication
Did you also try to specify the credentials in the URL (via http://name:password@...)?
and the ability to control headers of the request and response.
Do you have more information on that requirement?
Christian
On Tue, Nov 11, 2014 at 10:17 PM, Johan Mörén hutchkintoot@gmail.com wrote:
Hi Christian!
The main features was authentication and the ability to control headers of the request and response.
Regards, Johan
On Mon, Nov 10, 2014 at 3:00 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Johan, hi Florent,
Maybe 8 months ago, I have opened a new issue for extending HTTP client functionality in BaseX. The main requirement was that HTTP responses should be streamable. As HTTP responses are currently returned as elements, it is not possible (at least in BaseX) to include streamable sub elements. We could either…
- provide HTTP client functions that only return the body itself, or
- wrap all results in maps and arrays.
In both cases, we could avoid wrapping binary items as Base64, which would save us both memory and processing time.
My questions to you guys are:
@Florent: Have you thought about using maps and arrays in a new version of the HTTP Client spec?
@Johan (in case you remember): What HTTP client features do you need that prevent you from using the fetch:binary function?
Thanks in advance, Christian
[1] https://github.com/BaseXdb/basex/issues/914
On Fri, Mar 28, 2014 at 5:31 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Florent,
Is there any intrinsic difference, from an implementation point of view, in the context of streamability of the returned content, between a function returning always an xs:base64Binary item, and another one returning sometimes an xs:base64Binary item, sometimes a string, and sometimes a document node?
Yes there is, at least in our architecture: a specific function will always be streamable or not [1]. This static distinction is necessary because various optimizations rely on it.
I remember you talked about a second version of the HTTP Client Module... Have you thought about removing the "magic parts" of the spec and provide explicit functions for retrieving binary or string data, similar to the EXPath Archive and File Modules?
I am pretty sure Adam implemented streaming for the HTTP Client in eXist, so it might be interesting to have a look there as well.
Sounds interesting, but I couldn't find any hints in their documentation. Do you have any reference that confirms this assumption? Or some general info on how streamable results are handled in eXist? What about the first http:response item, do you know if it will also be streamed?
Best, Christian
basex-talk@mailman.uni-konstanz.de