Summary: This diff moves send intern request from the browser to the server. The reason to make this change is that making such requests from a browser environment causes CORS restrictions to kick in. Reviewed By: nikoant Differential Revision: D32835449 fbshipit-source-id: e8e92e51ca963aa50b3c859bb61c2381171e85ae
42 lines
920 B
TypeScript
42 lines
920 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import {GraphFileUpload, GraphResponse} from 'flipper-common';
|
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
|
|
export async function internGraphPOSTAPIRequest(
|
|
endpoint: string,
|
|
formFields: {
|
|
[key: string]: any;
|
|
},
|
|
fileFields: Record<string, GraphFileUpload>,
|
|
options: {
|
|
timeout?: number;
|
|
internGraphUrl?: string;
|
|
},
|
|
token: string,
|
|
): Promise<GraphResponse> {
|
|
throw new Error('Feature not implemented');
|
|
}
|
|
|
|
export async function internGraphGETAPIRequest(
|
|
endpoint: string,
|
|
params: {
|
|
[key: string]: any;
|
|
},
|
|
_options: {
|
|
timeout?: number;
|
|
internGraphUrl?: string;
|
|
},
|
|
token: string,
|
|
): Promise<GraphResponse> {
|
|
throw new Error('Feature not implemented');
|
|
}
|