Skip to content

Commit

Permalink
chore: remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Jun 25, 2024
1 parent 777a437 commit bb4f173
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/adapters/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ const commonHandler = async (axiosMethod, { statTags, method, ...args }) => {
* @returns
*/
const httpSend = async (options, statTags = {}) => {
// here the options argument K-Vs will take priority over the default options
const requestOptions = enhanceRequestOptions(options);
return commonHandler(axios, { statTags, options, requestOptions });
};
Expand All @@ -205,9 +204,7 @@ const httpSend = async (options, statTags = {}) => {
* handles http GET requests returns promise as a response throws error in case of non 2XX statuses
*/
const httpGET = async (url, options, statTags = {}) => {
// here the options argument K-Vs will take priority over the default options
const requestOptions = enhanceRequestOptions(options);

return commonHandler(axios.get, { statTags, method: 'get', url, options, requestOptions });
};

Expand All @@ -220,9 +217,7 @@ const httpGET = async (url, options, statTags = {}) => {
* handles http DELETE requests returns promise as a response throws error in case of non 2XX statuses
*/
const httpDELETE = async (url, options, statTags = {}) => {
// here the options argument K-Vs will take priority over the default options
const requestOptions = enhanceRequestOptions(options);

return commonHandler(axios.delete, { statTags, method: 'delete', url, options, requestOptions });
};

Expand All @@ -236,8 +231,6 @@ const httpDELETE = async (url, options, statTags = {}) => {
* handles http POST requests returns promise as a response throws error in case of non 2XX statuses
*/
const httpPOST = async (url, data, options, statTags = {}) => {
// let clientResponse;
// here the options argument K-Vs will take priority over the default options
const requestOptions = enhanceRequestOptions(options);
return commonHandler(axios.post, {
statTags,
Expand All @@ -247,31 +240,6 @@ const httpPOST = async (url, data, options, statTags = {}) => {
options,
requestOptions,
});

// const commonMsg = `[${statTags?.destType?.toUpperCase?.() || ''}] ${statTags?.endpointPath}`;
// logger.requestLog(`${commonMsg} request`, {
// metadata: statTags?.metadata,
// requestDetails: {
// url,
// body: data,
// method: 'post',
// },
// });
// const startTime = new Date();
// try {
// const response = await axios.post(url, data, requestOptions);
// clientResponse = { success: true, response };
// } catch (err) {
// clientResponse = { success: false, response: err };
// } finally {
// logger.responseLog(`${commonMsg} response`, {
// metadata: statTags?.metadata,
// responseDetails: getResponseDetails(clientResponse),
// });
// fireHTTPStats(clientResponse, startTime, statTags);
// }
// setResponsesForMockAxiosAdapter({ url, data, options, method: 'POST' }, clientResponse);
// return clientResponse;
};

/**
Expand All @@ -284,7 +252,6 @@ const httpPOST = async (url, data, options, statTags = {}) => {
* handles http PUT requests returns promise as a response throws error in case of non 2XX statuses
*/
const httpPUT = async (url, data, options, statTags = {}) => {
// here the options argument K-Vs will take priority over the default options
const requestOptions = enhanceRequestOptions(options);
return commonHandler(axios.put, { statTags, url, data, method: 'put', options, requestOptions });
};
Expand All @@ -299,7 +266,6 @@ const httpPUT = async (url, data, options, statTags = {}) => {
* handles http PATCH requests returns promise as a response throws error in case of non 2XX statuses
*/
const httpPATCH = async (url, data, options, statTags = {}) => {
// here the options argument K-Vs will take priority over the default options
const requestOptions = enhanceRequestOptions(options);
return commonHandler(axios.patch, {

Check warning on line 270 in src/adapters/network.js

View check run for this annotation

Codecov / codecov/patch

src/adapters/network.js#L270

Added line #L270 was not covered by tests
statTags,
Expand Down

0 comments on commit bb4f173

Please sign in to comment.