Move sending intern requests from client to server
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ad4a55f263
commit
943d535e86
41
desktop/flipper-server-core/src/fb-stubs/internRequests.tsx
Normal file
41
desktop/flipper-server-core/src/fb-stubs/internRequests.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
Reference in New Issue
Block a user