NetworkingModule

class NetworkingModule : NativeNetworkingAndroidSpec

Implements the XMLHttpRequest JavaScript interface.

Constructors

Link copied to clipboard
constructor(reactContext: ReactApplicationContext, @Nullable defaultUserAgent: String, client: OkHttpClient, @Nullable networkInterceptorCreators: List<NetworkInterceptorCreator>)
constructor(context: ReactApplicationContext)
constructor(context: ReactApplicationContext, networkInterceptorCreators: List<NetworkInterceptorCreator>)
constructor(context: ReactApplicationContext, defaultUserAgent: String)

Types

Link copied to clipboard
Link copied to clipboard
Allows adding custom handling to build the RequestBody from the JS body payload.
Link copied to clipboard
interface ResponseHandler
Allows adding custom handling to build the JS body payload from the ResponseBody.
Link copied to clipboard
interface UriHandler
Allows to implement a custom fetching process for specific URIs.

Properties

Link copied to clipboard
val METHOD_TYPE_ASYNC: String = "async"
Link copied to clipboard
val METHOD_TYPE_PROMISE: String = "promise"
Link copied to clipboard
val METHOD_TYPE_SYNC: String = "sync"
Link copied to clipboard
val NAME: String = "Networking"

Functions

Link copied to clipboard
open fun abortRequest(requestIdAsDouble: Double)
Link copied to clipboard
open fun addListener(eventName: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Return true if you intend to override some other native module that was registered e.g.
Link copied to clipboard
open fun clearCookies(callback: Callback)
Link copied to clipboard
Link copied to clipboard
open fun getName(): String
Link copied to clipboard
open fun initialize()
This method is called after ReactApplicationContext has been created.
Link copied to clipboard
open fun invalidate()
The CatalystInstance is going away with Venice.
Link copied to clipboard
Allow NativeModule to clean up.
Link copied to clipboard
open fun removeListeners(count: Double)
Link copied to clipboard
Link copied to clipboard
open fun sendRequest(method: String, url: String, requestIdAsDouble: Double, headers: ReadableArray, data: ReadableMap, responseType: String, useIncrementalUpdates: Boolean, timeoutAsDouble: Double, withCredentials: Boolean)
Link copied to clipboard
open fun sendRequestInternal(method: String, url: String, requestId: Int, headers: ReadableArray, data: ReadableMap, responseType: String, useIncrementalUpdates: Boolean, timeout: Int, withCredentials: Boolean)
Link copied to clipboard