We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20c5765 commit 7492019Copy full SHA for 7492019
src/command.js
@@ -80,10 +80,11 @@ class GraphqurlCommand extends Command {
80
if (headersArray) {
81
for (let h of headersArray) {
82
const parts = h.split(':');
83
- if (parts.length !== 2) {
84
- this.error(`cannot parse header '${h}' (multiple ':')`);
+ if (parts.length < 2) {
+ this.error(`cannot parse header '${h}' (no ':')`);
85
}
86
- headerObject[parts[0].trim()] = parts[1].trim();
+ const headerName = parts.splice(0, 1)[0].trim();
87
+ headerObject[headerName] = parts.join(':').trimLeft();
88
89
90
return headerObject;
0 commit comments