Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: use baseUrl to display full URL #97

Merged
merged 1 commit into from
Nov 5, 2021

Conversation

alexandre-abrioux
Copy link
Contributor

@alexandre-abrioux alexandre-abrioux commented Oct 19, 2021

This fixes #60 and takes into consideration the baseURL parameter of an axios instance.

Copy link
Owner

@hg-pyun hg-pyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for PR. I will review on weekend.

@alexandre-abrioux alexandre-abrioux force-pushed the feat-baseUrl branch 3 times, most recently from 2bff60f to 96b3531 Compare October 25, 2021 08:15
@alexandre-abrioux
Copy link
Contributor Author

Just forgot to update error.ts, it's done now :)

const buildConfig = assembleBuildConfig(config);

const stringBuilder = new StringBuilder(buildConfig);
const log = stringBuilder
.makeLogTypeWithPrefix('Response')
.makeDateFormat(new Date())
.makeMethod(method)
.makeUrl(url)
.makeUrl(stringBuilder.combineURLs(baseURL, url))
Copy link
Owner

@hg-pyun hg-pyun Oct 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MakeUrl is an abstract method of logic that manages url. I think the combine URLs business logic should be inside makeUrl.

How about .makeUrl(url, baseUrl)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! done :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. I will test and merge. Thank you.

@hg-pyun hg-pyun merged commit 258ad24 into hg-pyun:master Nov 5, 2021
@hg-pyun hg-pyun mentioned this pull request Nov 5, 2021
3 tasks
@alexandre-abrioux alexandre-abrioux deleted the feat-baseUrl branch November 5, 2021 08:45
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

formatting is not as advertized
2 participants