Skip to content
This repository has been archived by the owner on Dec 20, 2020. It is now read-only.

HEAD request ignores 'data' parameter #142

Open
MedFermi opened this issue Aug 10, 2017 · 5 comments
Open

HEAD request ignores 'data' parameter #142

MedFermi opened this issue Aug 10, 2017 · 5 comments

Comments

@MedFermi
Copy link

When I call:
qwest.map('GET', 'example.com', {canApprove: true})
it successfully requests 'example.com?canApprove=true'

But, when I call:
qwest.map('HEAD', 'example.com', {canApprove: true})
it requests 'example.com' with no query string

It looks like 'data' parameter is ignore for HEAD request.

@pyrsmk
Copy link
Owner

pyrsmk commented Aug 11, 2017

It's not a bug, it comes from the spec of the HTTP protocol : https://stackoverflow.com/questions/4529066/post-data-with-head-request

@pyrsmk pyrsmk closed this as completed Aug 11, 2017
@MedFermi
Copy link
Author

MedFermi commented Aug 11, 2017 via email

@pyrsmk pyrsmk reopened this Aug 12, 2017
@pyrsmk
Copy link
Owner

pyrsmk commented Aug 12, 2017

Sorry, I misunderstood your issue. Anyway, this feature request is tricky. This is not a bug, but a design issue. I think I should add a new dataType option, like queryString. I will work on this by sunday/monday.

@MedFermi
Copy link
Author

MedFermi commented Aug 14, 2017 via email

@pyrsmk
Copy link
Owner

pyrsmk commented Aug 16, 2017

It should be fixed by now ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants