HTTPRequest.exec

WRAPPERS

send file(s) using POST and multipart form. This wrapper will be deprecated, use post with MultipartForm - it is more general and clear.

Parameters

url string

url

files PostFile[]

array of PostFile structures

Return Value

Response Each PostFile structure contain path to file, and optional field name and content type. If no field name provided, then basename of the file will be used. application/octet-stream is default when no content type provided.

Examples

PostFile[] files = [
               {fileName:"tests/abc.txt", fieldName:"abc", contentType:"application/octet-stream"},
               {fileName:"tests/test.txt"}
           ];
rs = rq.exec!"POST"("http://httpbin.org/post", files);

Meta