Conga + HTTPGet

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Conga + HTTPGet

Postby Tomas Gustafsson on Sun Nov 23, 2014 4:32 am

v. 14.0.22432.0 32 Classic
Sep 2 2014 18:03:05

Uuuuh, please tellme dumb why

Code: Select all
      'e:\e-tv.net\screenshots\weathersylv.jpg' ⎕ntie ¯1
       b←⎕nread ¯1 82,⎕nsize ¯1
       ⎕nuntie ¯1
       ⍴b
154852

      ⍴¨a←Samples.TestWebClient 'http://www.stormwind.fi/images/stormwind/extra-filer/weathersylv.jpg'
   10 2  154852
      ⊃a
0
      2⊃a
 http/1.1 200 ok                               
 date             Sun, 23 Nov 2014 04:21:04 GMT
 server           Apache                       
 last-modified    Thu, 06 Nov 2014 20:09:03 GMT
 etag             "190540d-25ce4-507364488d5c0"
 accept-ranges    bytes                         
 content-length   154852                       
 content-type     image/jpeg                   
                                               
                                               
      +/b≠3⊃a
50813


... why b and a[3] are different? Sure must HTTPGet allow retrieving binary data, like pictures and zip files, or whatever?
Tomas Gustafsson
 
Posts: 101
Joined: Mon Sep 19, 2011 6:43 pm

Re: Conga + HTTPGet

Postby DanB|Dyalog on Mon Nov 24, 2014 1:17 am

Code: Select all
x←⎕nread ¯1 82,⎕nsize ¯1
applies some form of translation, that could be the problem.

Code: Select all
      a3←3⊃←Samples.TestWebClient 'http://www.stormwind.fi/images/stormwind/extra-filer/weathersylv.jpg'
      +/~a3∊⎕av
41346

try reading the file using the Unicode version and code 80 instead.
DanB|Dyalog
 


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest