Skip to content

HTTP Pipelining Example

Andrew Lambert edited this page Aug 23, 2015 · 13 revisions

HTTP pipelining is on by default and will be used if the server supports it. Use the same EasyHandle when making multiple requests of the same server to take advantage of this feature.

This example retrieves a web page and an image from the same website. If the server supports HTTP pipelining then both transfers will use the same connection.

  Dim c As New cURLClient
  Dim page As String
  Dim logo As Picture

  If c.Get("http://www.example.com/index.html") Then ' Transfer #1
    page = c.GetDownloadedData
  End If

  If c.Get("http://www.example.com/logo.png") Then  ' Transfer #2
    logo = Picture.FromData(c.GetDownloadedData)
  End If

To disable pipelining, set EasyHandle.AutoDisconnect to True.

Clone this wiki locally