Hi Alex,
At 09:00 +0200 19-05-08, Jon Kleiser wrote:
If I set up the input data for the getJSON call like this:
data = {Y: "Y-value", Z: 333};
data["*X"] = 111;
... then I can handle the request in Pico Lisp like this:
(de json ()
(httpHead "text/plain; charset=utf-8")
(ht:Out T
(
Hi Jon,
> space, like "A B", it will turn up in Pico Lisp like "A+B". Is there
As a built-in function there is only 'ht:Pack', which is used e.g. in
"lib/http.l".
But it just decodes hex patterns like "%20":
: (ht:Pack (chop "A%20B%20C"))
-> "A B C"
If you are only concerned about '+',
The + shows up in post data too, when the default "application/x-www-
form-urlencoded" content type is used and there are spaces in a value.
On 27 May 2008, at 5:16 AM, Alexander Burger wrote:
> Hi Jon,
>
>> properly. I get the "+" in Pico Lisp. Therefor I cannot know whether
>> a "+" in Pico Li
Hi Alex,
> space, like "A B", it will turn up in Pico Lisp like "A+B". Is there
As a built-in function there is only 'ht:Pack', which is used e.g. in
"lib/http.l".
But it just decodes hex patterns like "%20":
: (ht:Pack (chop "A%20B%20C"))
-> "A B C"
If you are only concerned about '
Hi Jon,
> properly. I get the "+" in Pico Lisp. Therefor I cannot know whether
> a "+" in Pico Lisp originated as a "+" or a space. I think the
> plus-to-space decoding has to be done at the same time as the %xy
> decoding. Or ...
OK, I understand.
As the %xy decoding happens in 'ht:Pack', yo
Hi Alex,
> properly. I get the "+" in Pico Lisp. Therefor I cannot know whether
a "+" in Pico Lisp originated as a "+" or a space. I think the
plus-to-space decoding has to be done at the same time as the %xy
decoding. Or ...
OK, I understand.
As the %xy decoding happens in 'ht:Pack', yo
Hi John,
> The + shows up in post data too, when the default "application/x-www-
> form-urlencoded" content type is used and there are spaces in a value.
Thanks. I was not aware of that (or forgot about it), perhaps because
the picoLisp server exclusively uses content type "multipart/form-data".
Hi Jon,
> Could it be me doing something wrong in Pico Lisp? Here are the first
> few lines on my request handler:
>
> (de getDirectory ()
> (let Path (get 'path 'http)
> (out NIL (println "getDirectory request" Path))
> (httpHead "text/javascript; charset=utf-8
Hi Alex,
Hi Jon,
Could it be me doing something wrong in Pico Lisp? Here are the first
few lines on my request handler:
(de getDirectory ()
(let Path (get 'path 'http)
(out NIL (println "getDirectory request" Path))
(httpHead "text/javascript; charse