fromCompletedRequest

open fun fromCompletedRequest(@NonNull url: String, @NonNull httpMethod: HttpMethod, startTime: Long, endTime: Long, bytesSent: Long, bytesReceived: Long, statusCode: Int): 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.


open fun fromCompletedRequest(@NonNull url: String, @NonNull httpMethod: HttpMethod, startTime: Long, endTime: Long, bytesSent: Long, bytesReceived: Long, statusCode: Int, @Nullable traceId: String): 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.


open fun fromCompletedRequest(@NonNull url: String, @NonNull httpMethod: HttpMethod, startTime: Long, endTime: Long, bytesSent: Long, bytesReceived: Long, statusCode: Int, @Nullable traceId: String, @Nullable networkCaptureData: NetworkCaptureData): 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.

networkCaptureData

the network capture data for the request.


open fun fromCompletedRequest(@NonNull url: String, @NonNull httpMethod: HttpMethod, startTime: Long, endTime: Long, bytesSent: Long, bytesReceived: Long, statusCode: Int, @Nullable traceId: String, @Nullable w3cTraceparent: String, @Nullable networkCaptureData: NetworkCaptureData): 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.

w3cTraceparent

W3C-compliant traceparent representing the network call that is being recorded

networkCaptureData

the network capture data for the request.