Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brigad
redux-rest-easy
Commits
330c8515
Commit
330c8515
authored
7 years ago
by
Adrien HARNAY
Committed by
Thibault Malbranche
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix(networkHelpers): allow no token
parent
b1982e3f
master
dependabot/npm_and_yarn/bin-links-1.1.8
dependabot/npm_and_yarn/browserslist-4.16.6
dependabot/npm_and_yarn/codecov-3.8.3
dependabot/npm_and_yarn/decode-uri-component-0.2.2
dependabot/npm_and_yarn/elliptic-6.5.4
dependabot/npm_and_yarn/eslint-utils-1.4.2
dependabot/npm_and_yarn/handlebars-4.7.7
dependabot/npm_and_yarn/hosted-git-info-2.8.9
dependabot/npm_and_yarn/https-proxy-agent-2.2.4
dependabot/npm_and_yarn/ini-1.3.7
dependabot/npm_and_yarn/json5-1.0.2
dependabot/npm_and_yarn/loader-utils-1.4.2
dependabot/npm_and_yarn/lodash-4.17.21
dependabot/npm_and_yarn/moment-2.29.4
dependabot/npm_and_yarn/node-fetch-2.6.7
dependabot/npm_and_yarn/normalize-url-4.5.1
dependabot/npm_and_yarn/npm-6.14.6
dependabot/npm_and_yarn/npm-user-validate-1.0.1
dependabot/npm_and_yarn/path-parse-1.0.7
dependabot/npm_and_yarn/qs-6.7.3
dependabot/npm_and_yarn/semantic-release-17.2.3
dependabot/npm_and_yarn/tar-2.2.2
dependabot/npm_and_yarn/terser-4.8.1
dependabot/npm_and_yarn/tmpl-1.0.5
dependabot/npm_and_yarn/trim-off-newlines-1.0.3
dependabot/npm_and_yarn/y18n-3.2.2
v4.0.1
v4.0.0
v3.0.3
v3.0.2
v3.0.1
v3.0.0
v2.9.3
v2.9.2
v2.9.1
v2.9.0
v2.8.6
v2.8.5
v2.8.4
v2.8.3
v2.8.2
v2.8.1
v2.8.0
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.0
v2.3.6
v2.3.5
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/internals/network/getDefaultNetworkHelpers.js
+15
-5
src/internals/network/getDefaultNetworkHelpers.js
with
15 additions
and
5 deletions
+15
-5
src/internals/network/getDefaultNetworkHelpers.js
+
15
-
5
View file @
330c8515
...
...
@@ -5,7 +5,9 @@ const DEFAULT_NETWORK_HELPERS = {
method
:
'
GET
'
,
headers
:
{
Accept
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
getToken
()}
`
,
...(
this
.
getToken
&&
this
.
getToken
()
?
{
Authorization
:
`Bearer
${
this
.
getToken
()}
`
}
:
{}),
},
};
},
...
...
@@ -14,8 +16,10 @@ const DEFAULT_NETWORK_HELPERS = {
method
:
'
PATCH
'
,
headers
:
{
Accept
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
getToken
()}
`
,
'
Content-Type
'
:
'
application/json
'
,
...(
this
.
getToken
&&
this
.
getToken
()
?
{
Authorization
:
`Bearer
${
this
.
getToken
()}
`
}
:
{}),
},
body
:
JSON
.
stringify
(
body
),
};
...
...
@@ -25,8 +29,10 @@ const DEFAULT_NETWORK_HELPERS = {
method
:
'
PUT
'
,
headers
:
{
Accept
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
getToken
()}
`
,
'
Content-Type
'
:
'
application/json
'
,
...(
this
.
getToken
&&
this
.
getToken
()
?
{
Authorization
:
`Bearer
${
this
.
getToken
()}
`
}
:
{}),
},
body
:
JSON
.
stringify
(
body
),
};
...
...
@@ -36,8 +42,10 @@ const DEFAULT_NETWORK_HELPERS = {
method
:
'
POST
'
,
headers
:
{
Accept
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
getToken
()}
`
,
'
Content-Type
'
:
'
application/json
'
,
...(
this
.
getToken
&&
this
.
getToken
()
?
{
Authorization
:
`Bearer
${
this
.
getToken
()}
`
}
:
{}),
},
body
:
JSON
.
stringify
(
body
),
};
...
...
@@ -47,7 +55,9 @@ const DEFAULT_NETWORK_HELPERS = {
method
:
'
DELETE
'
,
headers
:
{
Accept
:
'
application/json
'
,
Authorization
:
`Bearer
${
this
.
getToken
()}
`
,
...(
this
.
getToken
&&
this
.
getToken
()
?
{
Authorization
:
`Bearer
${
this
.
getToken
()}
`
}
:
{}),
},
};
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets