MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / sendRequest

Method sendRequest

Libraries/Network/RCTNetworking.ios.js:27–50  ·  view source on GitHub ↗
(
    method: string,
    trackingName: string,
    url: string,
    headers: Object,
    data: RequestBody,
    responseType: 'text' | 'base64',
    incrementalUpdates: boolean,
    timeout: number,
    callback: (requestId: number) => any,
    withCredentials: boolean
  )

Source from the content-addressed store, hash-verified

25 }
26
27 sendRequest(
28 method: string,
29 trackingName: string,
30 url: string,
31 headers: Object,
32 data: RequestBody,
33 responseType: 'text' | 'base64',
34 incrementalUpdates: boolean,
35 timeout: number,
36 callback: (requestId: number) => any,
37 withCredentials: boolean
38 ) {
39 const body = convertRequestBody(data);
40 RCTNetworkingNative.sendRequest({
41 method,
42 url,
43 data: {...body, trackingName},
44 headers,
45 responseType,
46 incrementalUpdates,
47 timeout,
48 withCredentials
49 }, callback);
50 }
51
52 abortRequest(requestId: number) {
53 RCTNetworkingNative.abortRequest(requestId);

Callers 1

sendMethod · 0.45

Calls 1

convertRequestBodyFunction · 0.85

Tested by

no test coverage detected