FIRHTTPMetric
@interface FIRHTTPMetric : NSObject <FIRPerformanceAttributable>
FIRHTTPMetric object can be used to make the SDK record information about a HTTP network request.
-
Creates HTTPMetric object for a network request.
Declaration
Objective-C
- (nullable instancetype)initWithURL:(nonnull NSURL *)URL HTTPMethod:(FIRHTTPMethod)httpMethod;
Parameters
URL
The URL for which the metrics are recorded.
httpMethod
HTTP method used by the request.
-
Use
initWithURL:HTTPMethod:
for Objective-C andinit(url:httpMethod:)
for Swift.Declaration
Objective-C
- (nonnull instancetype)init;
-
HTTP Response code. Values are greater than 0.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) NSInteger responseCode;
-
Size of the request payload.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) long requestPayloadSize;
-
Size of the response payload.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) long responsePayloadSize;
-
HTTP Response content type.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *responseContentType;
-
Marks the start time of the request.
Declaration
Objective-C
- (void)start;
-
Marks the end time of the response and queues the network request metric on the device for transmission. Check the logs if the metric is valid.
Declaration
Objective-C
- (void)stop;