Hi,I can't find a way to send a "multipart/form-data" POST request with 
http.client.
I've looked at docs and vocabs, and a bit through source, but I got lost in the 
implementation details.
Is the functionality there? Should
    "multipart/form-data" <post-data>do the trick?
Looking at the "write-request" and "write-post-data" words (in 
http.client.private and http.client.post-data resp), the "content-type" slot in 
the "post-data" tuple doesn't seem to make any difference.
I tried:    IN: scratchpad "multipart/form-data" <post-data>
    IN: scratchpad "Some data" >>data
    IN: scratchpad URL" test.org" <post-request>
    IN: scratchpad [ write-request ] with-string-writer
    IN: scratchpad print
    POST http://test.org/ HTTP/1.1
    connection: close
    content-length: 9
    content-type: multipart/form-data
    host: test.org
    user-agent: Factor http.client

    Some data
    IN: scratchpad 

For ref: https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4

If this is not present, what would be a good way of implementing it?
Thanks,
fede s.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to