Hi Johan,
that's something you may know anyway, but... you can as well specify the
authentication data in your URL:
http://name:password@...
Hope this helps,
Christian
On Thu, Mar 27, 2014 at 3:37 PM, Johan Mörén <hutchkintoot@gmail.com> wrote:
> Hi Christian
>
> The options i need from the http-module are at the moment mainly the ability
> to authenticate. Getting hold of response/request headers and status code
> are also very useful if you want to do some more detailed error handling.
>
> Extending the HTTP-module sounds like my favourite as well.
>
> /Johan
>
>
> On Thu, Mar 27, 2014 at 1:57 PM, Christian Grün <christian.gruen@gmail.com>
> wrote:
>>
>> Hi Johan,
>>
>> the HTTP Module is pretty magic, because it automatically tries to
>> convert the input to the expected result format. This makes it
>> difficult to stream.
>>
>> We have already pondered two options to circumvent this restriction:
>>
>> * Fetch Module: extend the function signatures with additional options
>> * HTTP Module (our favorite): add additional functions (e.g.
>> http:get(), http:post(), etc.) with xs:base64 as return type.
>>
>> Which options of the HTTP Module do you currently use?
>>
>> Christian
>> ______________________________
>>
>> On Thu, Mar 27, 2014 at 1:06 PM, Johan Mörén <hutchkintoot@gmail.com>
>> wrote:
>> > Hi
>> >
>> > I have built a small client in XQuery that fetches zip files from
>> > another
>> > remote service using the http-module and stores them on disk with the
>> > help
>> > of the file-module.
>> >
>> > Some of the returned zip files are really large and BaseX seems to need
>> > to
>> > materialize the files in memory before writing them to disk resulting in
>> > out
>> > of memory errors for some files.
>> >
>> > Is there some way read the response in a more streamable fashion when
>> > using
>> > the http-module?
>> >
>> > I tried using the fetch:binary function successfully but i really need
>> > the
>> > more extended functionality of the http-module.
>> >
>> > #results in out of memory if the zip file is too large
>> > file:write-binary("file.zip", http:sendrequest(...)[2])
>> >
>> > #works all the time.
>> > file:write-binary("file.zip", fetch:binary(...))
>> >
>> > Regards,
>> > Johan
>> >
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > BaseX-Talk mailing list
>> > BaseX-Talk@mailman.uni-konstanz.de
>> > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>> >
>
>