MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / getApiInstance

Function getApiInstance

web/pgadmin/static/js/api_instance.js:16–24  ·  view source on GitHub ↗
(headers={})

Source from the content-addressed store, hash-verified

14/* Get the axios instance to call back end APIs.
15Do not import axios directly, instead use this */
16export default function getApiInstance(headers={}) {
17 return axios.create({
18 headers: {
19 'Content-type': 'application/json',
20 [pgAdmin.csrf_token_header]: pgAdmin.csrf_token,
21 ...headers,
22 }
23 });
24}
25
26export function parseApiError(error, withData=false) {
27 if (error.response) {

Callers 15

server.jsFile · 0.85
connect_to_serverFunction · 0.85
fetch_connection_statusFunction · 0.85
disconnectFunction · 0.85
pga_job.jsFile · 0.85
database.jsFile · 0.85
disconnectFunction · 0.85
enableFunction · 0.85
disableFunction · 0.85
runFunction · 0.85
enableFunction · 0.85
disableFunction · 0.85

Calls 1

createMethod · 0.45

Tested by

no test coverage detected