Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
epo-proxy-api-client
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
crawlers
epo-proxy-api-client
Commits
8c628631
Verified
Commit
8c628631
authored
Dec 09, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[refactor] upgrade to servant-client 0.20
parent
cf4e5004
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
.gitignore
.gitignore
+2
-1
cabal.project
cabal.project
+3
-3
epo-api-client.cabal
epo-api-client.cabal
+2
-2
Client.hs
src/EPO/API/Client.hs
+3
-3
No files found.
.gitignore
View file @
8c628631
dist-newstyle/
\ No newline at end of file
dist-newstyle/
.stack-work/
\ No newline at end of file
cabal.project
View file @
8c628631
with-compiler: ghc-9.4.
7
with-compiler: ghc-9.4.
8
packages:
./
...
...
@@ -11,5 +11,5 @@ source-repository-package
allow-newer: base:*
, iso639:aeson
, iso639:text
, servant-client:servant
, servant-client:servant-client-core
--
, servant-client:servant
--
, servant-client:servant-client-core
epo-api-client.cabal
View file @
8c628631
...
...
@@ -76,8 +76,8 @@ library
, iso639
, network-uri ^>= 2.6.4.2
, protolude >= 0.3.3 && < 0.4
, servant >= 0.
19.1
&& < 0.21
, servant-client >= 0.
19 && < 0.20
, servant >= 0.
20
&& < 0.21
, servant-client >= 0.
20 && < 0.21
, text >= 2.0 && < 3
-- Directories containing source files.
...
...
src/EPO/API/Client.hs
View file @
8c628631
...
...
@@ -34,9 +34,9 @@ defaultClientEnv uri = do
else
(
readEither
(
T
.
unpack
$
T
.
tail
$
T
.
pack
uriPort
)
::
Either
[
Char
]
Int
)
manager
<-
newManager
managerSettings
let
env'
=
mkClientEnv
manager
$
BaseUrl
proto
uriRegName
(
fromRight
80
uriPort'
)
""
let
makeClientRequest
bu
req
=
let
r
=
defaultMakeClientRequest
bu
req
in
r
{
requestHeaders
=
(
requestHeaders
r
)
<>
[(
"User-Agent"
,
"servant.client"
)]}
let
makeClientRequest
bu
req
=
do
r
<-
defaultMakeClientRequest
bu
req
pure
$
r
{
requestHeaders
=
(
requestHeaders
r
)
<>
[(
"User-Agent"
,
"servant.client"
)]}
let
env
=
env'
{
makeClientRequest
}
-- pure $ addLoggingToClientEnv env
pure
env
...
...
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