comp • gb.net.curl • httpclient • postfile

HttpClient.PostFile (gb.net.curl)

Sub PostFile ( ContentType As String, Path As String [ , Headers As String[], TargetFile As String ] )

Send a file through a POST request.

  • ContentType is the MIME type of the file.

  • Path is the path of the file to post.

  • Headers is an optional String array of HTTP headers.

  • TargetFile is an optional file where the response will be written.

If TargetFile is not specified, data received from server is stored in memory, and you can access to the document using standard stream methods or the Peek method.

If TargetFile is specified, data received from server will be saved in the specified file, and will be not available in the internal memory buffer.