Skip to content

HTTP Pipelining Example

Andrew Lambert edited this page May 27, 2015 · 13 revisions

HTTP pipelining is on by default and will be used if the server supports it. Use the same cURLItem 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/") 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

Clone this wiki locally