How to use the requests proxy from Nango
try { const res = await nango.proxy({ method: 'POST', baseUrlOverride: 'https://api.example.com', endpoint: '/external-endpoint', providerConfigKey: '<string>', connectionId: '<string>', retries: 5, // Retries with exponential backoff (optional, default 0) data: { id: 1, colorId: 'blue', selected: true } }); // Response was 200! // See https://axios-http.com/docs/res_schema console.log(res.data); } catch (error) { // Status of response != 200 // See https://axios-http.com/docs/handling_errors console.log(error.response.data); console.log(error.response.status); console.log(error.response.headers); }
Was this page helpful?