Re: [racket-users] upload file with http post an Content-Type is multipart/form

2016-01-10 Thread
在 2016年1月9日星期六 UTC+8上午10:32:24,Neil Van Dyke写道: > One problem is that you should have *two* CR-LF byte sequences to > terminate the header list in each MIME multipart part. > > For example, instead of: > > "--" boundary CRLF > "Content-Disposition: form-data; name=\"file\"; > filename

[racket-users] upload file with http post an Content-Type is multipart/form

2016-01-08 Thread
Hi, I have a problem when upload file through http post method. Here is my code: #lang racket (require net/uri-codec) (require net/url) (require json) (require net/http-client) (define (->string bs) (if (bytes? bs) (bytes->string/utf-8 bs) bs)) (define (->bytes str) (cond [(s

[racket] how can I convert a list or vector to ctype array directly?

2012-12-14 Thread
Instead through iteration like for or do which assign values to element of array, deliver list or vector directly to the ctype function imported by ffi. Because I think that operating the list or vector with built-in functions is more conveniently than the ctype array. In the reference, I find _a

[racket] how to create a ctype array

2012-12-13 Thread
in the reference, I see the _array function, but I don't understand well, when i try to do, always output errors, can anyone give me an example? here is my test in REPL:racket@> (_array _int 3)#racket@> (array? (_array _int 3))    ; why?#fracket@> Racket Users list: http://