fromCompletedRequest

fun fromCompletedRequest(url: String, httpMethod: HttpMethod, startTime: Long, endTime: Long, bytesSent: Long, bytesReceived: Long, statusCode: Int, traceId: String? = null, w3cTraceparent: String? = null, networkCaptureData: NetworkCaptureData? = null): EmbraceNetworkRequest

Construct a new EmbraceNetworkRequest instance where a HTTP response was returned. If no response was returned, use .fromIncompleteRequest instead.

Return

a new EmbraceNetworkRequest instance.

Parameters

url

the URL of the request.

httpMethod

the HTTP method of the request.

startTime

the start time of the request.

endTime

the end time of the request.

bytesSent

the number of bytes sent.

bytesReceived

the number of bytes received.

statusCode

the status code of the response.

traceId

the trace ID of the request, used for distributed tracing.