Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
G
GS.Terminal.VisitorSelfService
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
终端组
GS.Terminal.VisitorSelfService
Commits
26215512
Commit
26215512
authored
Sep 14, 2021
by
姜春辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正HttpClient池Authorization设置错误的bug
parent
e23d7924
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
WebApi.cs
...gic/GS.Terminal.VisitorSelfService.Logic/Remote/WebApi.cs
+6
-0
No files found.
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Remote/WebApi.cs
View file @
26215512
...
...
@@ -25,6 +25,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote
if
(!
string
.
IsNullOrEmpty
(
_token
))
_client
.
DefaultRequestHeaders
.
Add
(
"Authorization"
,
$"Bearer
{
_token
}
"
);
return
_client
;
},
(
httpclient
)
=>
{
var
_client
=
httpclient
.
Value
;
_client
.
DefaultRequestHeaders
.
Remove
(
"Authorization"
);
if
(!
string
.
IsNullOrEmpty
(
_token
))
_client
.
DefaultRequestHeaders
.
Add
(
"Authorization"
,
$"Bearer
{
_token
}
"
);
});
}
public
static
async
Task
<
T
>
GetTAsync
<
T
>(
string
service
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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