Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Refactor request to act more like JS #1349

Merged
merged 2 commits into from
May 28, 2024
Merged

Refactor request to act more like JS #1349

merged 2 commits into from
May 28, 2024

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented May 24, 2024

What?

Return nil when the value is empty for postData and postDataBuffer.

Why?

This follows JS conventions.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

#1308

@ankur22 ankur22 changed the base branch from main to main-async May 24, 2024 14:56
@ankur22 ankur22 changed the base branch from main-async to async-request May 24, 2024 14:56
common/http.go Show resolved Hide resolved
Base automatically changed from async-request to main-async May 28, 2024 08:10
If the postData is an empty string, return a nil instead which better
aligns with JS.
When the buffer is empty return a nil, which is how js apis work.
@ankur22 ankur22 merged commit 10a73ab into main-async May 28, 2024
14 checks passed
@ankur22 ankur22 deleted the refactor/request branch May 28, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants