ADEumHTTPRequestTracker Class Reference

Inherits from NSObject
Declared in ADEumHTTPRequestTracker.h

Overview

If the SDK does not automatically discover your HTTP requests, use this class to explicitly report them. Note that most users will not need to use this class; check the documentation for the list of HTTP APIs that are automatically discovered.

+ requestTrackerWithURL:

Begins tracking an HTTP request.

+ (ADEumHTTPRequestTracker *)requestTrackerWithURL:(NSURL *)url

Parameters

url

The URL being requested.

Discussion

Call this immediately before sending an HTTP request to track it manually.

Warning: url must not be nil.

Warning: One of ADEumInstrumentation’s initWithKey: methods must be called before this method.

Declared In

ADEumHTTPRequestTracker.h

– reportDone

Stops tracking an HTTP request.

- (void)reportDone

Discussion

Immediately after receiving a response or an error, set the appropriate properties and call this method to report the outcome of the HTTP request. You should not continue to use this object after calling this method – if you need to track another request, call requestTrackerWithURL:.

Declared In

ADEumHTTPRequestTracker.h

  url

The URL for the network request

@property (copy, nonatomic) NSURL *url

Declared In

ADEumHTTPRequestTracker.h

  error

An error describing the failure to receive a response, if one occurred.

@property (copy, nonatomic) NSError *error

Discussion

If the request was successful, this should be nil.

Declared In

ADEumHTTPRequestTracker.h

  statusCode

The status code of response, if one was received.

@property (copy, nonatomic) NSNumber *statusCode

Discussion

If a response was received, this should be an an integer. If an error occurred and a response was not received, this should be nil.

Declared In

ADEumHTTPRequestTracker.h

  allHeaderFields

A dictionary representing the keys and values from the server’s response header.

@property (copy, nonatomic) NSDictionary *allHeaderFields

Discussion

If an error occurred and a response was not received, this should be nil.

Declared In

ADEumHTTPRequestTracker.h

  allRequestHeaderFields

A dictionary representing the keys and values from the client’s request header.

@property (copy, nonatomic) NSDictionary *allRequestHeaderFields

Declared In

ADEumHTTPRequestTracker.h

  instrumentationSource

A string to identify the source of the instrumentation that generated this tracker.

@property (copy, nonatomic) NSString *instrumentationSource

Discussion

The default is “Manual HttpTracker”.

You should not have to modify this.

Declared In

ADEumHTTPRequestTracker.h