binary data over .z.ph

Hi,

I am trying to send serialised data over .z.ph but i keep getting type error

.z.ph: { -8! 10 } 

results in `type but this works

.z.ph: { raze string -8 ! 10 }

Should i resort to .z.ws (websockets)  for binary data or is there a way to send/receive binary data using .z.ph

Thanks

Bharani

.z.ph needs to return a string as output. 

Generally it should be a valid HTTP response string.

I am not sure that is entirely correct. If i put an image under html folder i can see it perfectly served from the browser. I don’t fully understand the default K code but it has no problem serving images. So the question is can I do the same from Q?

.z.ph must return a char vector. It can serve image files as they are returned as a char vector in q.k here
 #r:@[1::;$":",p:HOME,"/",x;""];hy[$last@“.”:x]“c”$r;