Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDefault header documentation is incomplete #2436
Comments
axios/lib/core/dispatchRequest.js Lines 37 to 42 in 405d50e
You can set the headers for Let me know if this is helpful |
|
Closed in favor of #2618. |
Section/Content To Improve
Config defaults
Suggested Improvement
The documentation teases with a concept of
commonwhen setting default header values:Presumably, that means for all request methods, but (playing devil's advocate here) maybe it's demonstrating that you can set default headers for custom request methods (like if your server accepts a custom request method of
common).Is
commonactually a keyword that means any request method?Are there other keywords with special meaning? Like, for example, one that applies only to requests containing a payload?
Does any other non-keyword value apply to a
methodvalue? Even custom methods?Is it possible to set a default header for requests to my server that understands
commonas a custom HTTP method?If I set a
commonheader and agetheader, doesgetoverridecommon?Is there a simple way to apply a header to requests of every method type except one?
What effect will that have?
Some of my questions are hypothetical. Forgive me.
Relevant File(s): README.md