Conforms to NSObject
Declared in RCTURLRequestDelegate.h

Overview

An abstract interface used by request handler modules to send data back over the bridge back to JS.

Tasks

  • – URLRequest:didReceiveResponse:

    Call this when you first receives a response from the server. This should include response headers, etc.

    required method
  • – URLRequest:didReceiveData:

    Call this when you receive data from the server. This can be called multiple times with partial data chunks, or just once with the full data packet.

    required method
  • – URLRequest:didCompleteWithError:

    Call this when the request is complete and/or if an error is encountered. For a successful request, the error parameter should be nil.

    required method

Instance Methods

URLRequest:didCompleteWithError:

- (void)URLRequest:(id)requestToken didCompleteWithError:(NSError *)error
Discussion

Call this when the request is complete and/or if an error is encountered. For a successful request, the error parameter should be nil.

Declared In

RCTURLRequestDelegate.h

URLRequest:didReceiveData:

- (void)URLRequest:(id)requestToken didReceiveData:(NSData *)data
Discussion

Call this when you receive data from the server. This can be called multiple times with partial data chunks, or just once with the full data packet.

Declared In

RCTURLRequestDelegate.h

URLRequest:didReceiveResponse:

- (void)URLRequest:(id)requestToken didReceiveResponse:(NSURLResponse *)response
Discussion

Call this when you first receives a response from the server. This should include response headers, etc.

Declared In

RCTURLRequestDelegate.h