Record Class McpNetworkTransactionDetail
java.lang.Object
java.lang.Record
com.shaft.mcp.McpNetworkTransactionDetail
- Record Components:
id- 1-based transaction idmethod- HTTP methodurl- request URLstatus- HTTP response status code, or0when the exchange failedmimeType- responseContent-Typewithout parameters, blank when absentdurationMs- exchange duration in millisecondsrequestSizeBytes- request body size in bytesresponseSizeBytes- response body size in bytestimestamp- epoch millis when the exchange finishedfailureReason- safe failure reason, blank on successrequestHeaders- sanitized request headersresponseHeaders- sanitized response headersbodyPreview- truncated, redacted response body preview
public record McpNetworkTransactionDetail(int id, String method, String url, int status, String mimeType, long durationMs, long requestSizeBytes, long responseSizeBytes, long timestamp, String failureReason, Map<String,String> requestHeaders, Map<String,String> responseHeaders, String bodyPreview)
extends Record
One observed network transaction's detail returned by
browser_network_requests when called
with an id, including headers and a truncated, redacted response body preview as recorded
by trace capture.
Full, untruncated request/response bodies are not available from this tool; they require a
capture_start session (optionally with its nested codegenOptions) started with
saveHarContent=full.
-
Constructor Summary
ConstructorsConstructorDescriptionMcpNetworkTransactionDetail(int id, String method, String url, int status, String mimeType, long durationMs, long requestSizeBytes, long responseSizeBytes, long timestamp, String failureReason, Map<String, String> requestHeaders, Map<String, String> responseHeaders, String bodyPreview) Creates an instance of aMcpNetworkTransactionDetailrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebodyPreviewrecord component.longReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureReasonrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.method()Returns the value of themethodrecord component.mimeType()Returns the value of themimeTyperecord component.Returns the value of therequestHeadersrecord component.longReturns the value of therequestSizeBytesrecord component.Returns the value of theresponseHeadersrecord component.longReturns the value of theresponseSizeBytesrecord component.intstatus()Returns the value of thestatusrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
McpNetworkTransactionDetail
public McpNetworkTransactionDetail(int id, String method, String url, int status, String mimeType, long durationMs, long requestSizeBytes, long responseSizeBytes, long timestamp, String failureReason, Map<String, String> requestHeaders, Map<String, String> responseHeaders, String bodyPreview) Creates an instance of aMcpNetworkTransactionDetailrecord class.- Parameters:
id- the value for theidrecord componentmethod- the value for themethodrecord componenturl- the value for theurlrecord componentstatus- the value for thestatusrecord componentmimeType- the value for themimeTyperecord componentdurationMs- the value for thedurationMsrecord componentrequestSizeBytes- the value for therequestSizeBytesrecord componentresponseSizeBytes- the value for theresponseSizeBytesrecord componenttimestamp- the value for thetimestamprecord componentfailureReason- the value for thefailureReasonrecord componentrequestHeaders- the value for therequestHeadersrecord componentresponseHeaders- the value for theresponseHeadersrecord componentbodyPreview- the value for thebodyPreviewrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
-
method
-
url
-
status
-
mimeType
-
durationMs
public long durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-
requestSizeBytes
public long requestSizeBytes()Returns the value of therequestSizeBytesrecord component.- Returns:
- the value of the
requestSizeBytesrecord component
-
responseSizeBytes
public long responseSizeBytes()Returns the value of theresponseSizeBytesrecord component.- Returns:
- the value of the
responseSizeBytesrecord component
-
timestamp
-
failureReason
Returns the value of thefailureReasonrecord component.- Returns:
- the value of the
failureReasonrecord component
-
requestHeaders
Returns the value of therequestHeadersrecord component.- Returns:
- the value of the
requestHeadersrecord component
-
responseHeaders
Returns the value of theresponseHeadersrecord component.- Returns:
- the value of the
responseHeadersrecord component
-
bodyPreview
Returns the value of thebodyPreviewrecord component.- Returns:
- the value of the
bodyPreviewrecord component
-