All Classes Namespaces Files Functions Pages
Layer5.Http.CapturedHttpData Class Reference

This class represents captured HTTP data. More...

Methods

 Description.Get
 Returns a textual description of the object.
 
 Http.Bytes.Get
 Returns the captured HTTP data. More...
 
 Http.Bytes.Save fileName
 Saves the captured HTTP data to file. More...
 
 Http.Size.Get
 Returns the number of captured bytes of HTTP data. More...
 
 Parent.Get
 Returns the parent object.
 
 Refresh
 Synchronize the local cached captured HTTP data with data on the ByteBlower Server. More...
 

Class overview

This class represents captured HTTP data.

The HTTP data is a local snapshot of the HTTP data received in a HTTP session at the ByteBlower Server.

HTTP data capture is currently supported on HTTP Client objects.

Definition at line 11998 of file api.tcl.

Method documentation

Layer5.Http.CapturedHttpData::Http.Bytes.Get

Returns the captured HTTP data.

The data includes both HTTP header and payload.

Note
This only outputs the local cached HTTP data. The local cached HTTP data is a snapshot of the HTTP data received at the ByteBlower server. If no local snapshot was available yet, an initial one will be obtained from the server. You may want to synchronize the local cached data using the Refresh method.
Returns
Captured HTTP data as string.
Exceptions
ByteBlower.Protocol.NotSupportedWhen the ByteBlower Server does not support HTTP Client captures
Example

Suppose we sent a HTTP GET request for an 'index.html' test page

1 $httpCapture Http.Bytes.Get

Returns:

HTTP/1.1 200 OK 
  Date: Wed, 12 Feb 2014 13:23:32 GMT 
  Server: Apache/2.2.22 (Debian) 
  Last-Modified: Thu, 10 Feb 2011 11:32:16 GMT 
  ETag: "27c083-b1-49bebeefcb000" 
  Accept-Ranges: bytes 
  Content-Length: 177 
  Vary: Accept-Encoding 
  Content-Type: text/html 
  X-Pad: avoid browser bug 
   
  <html><body><h1>It works!</h1> 
  <p>This is the default web page for this server.</p> 
  <p>The web server software is running but no content has been added, yet.</p> 
  </body></html> 

Definition at line 12035 of file api.tcl.

Layer5.Http.CapturedHttpData::Http.Bytes.Save   fileName  

Saves the captured HTTP data to file.

Note
This only outputs the local cached HTTP data. The local cached HTTP data is a snapshot of the HTTP data received at the ByteBlower server. If no local snapshot was available yet, an initial one will be obtained from the server. You may want to synchronize the local cached data using the Refresh method.
Parameters
fileNameDestination filename for the captured HTTP data.
Exceptions
ByteBlower.Protocol.NotSupportedWhen the ByteBlower Server does not support HTTP Client captures
Example

Stores all HTTP data captured to c:.txt

1 $capture Http.Bytes.Save "c:\\http.txt"

Definition at line 12051 of file api.tcl.

Layer5.Http.CapturedHttpData::Http.Size.Get

Returns the number of captured bytes of HTTP data.

The value includes the size of both HTTP header and payload.

Note
This only outputs the local cached HTTP data. The local cached HTTP data is a snapshot of the HTTP data received at the ByteBlower server. If no local snapshot was available yet, an initial one will be obtained from the server. You may want to synchronize the local cached data using the Refresh method.
Returns
Size of captured HTTP data in Bytes.
Exceptions
ByteBlower.Protocol.NotSupportedWhen the ByteBlower Server does not support HTTP Client captures
Example

Suppose we sent a HTTP GET request for an index.html test page

1 $httpCapture Http.Size.Get

Returns:

461 

Definition at line 12069 of file api.tcl.

Layer5.Http.CapturedHttpData::Refresh

Synchronize the local cached captured HTTP data with data on the ByteBlower Server.

This method will contact the ByteBlower Server to update the local snapshot with the latest snapshot from the server.

If the update fails the current snapshot will not be altered.

Exceptions
ByteBlower.Protocol.NotSupportedWhen the ByteBlower Server does not support HTTP Client captures

Definition at line 12086 of file api.tcl.