Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
db87b0a9
Commit
db87b0a9
authored
Oct 16, 2024
by
Titouan Soulard
Committed by
Xiaowu Zhang
Feb 24, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_jio_connector: add timeout for connection to API
parent
6086d967
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
bt5/erp5_jio_connector/DocumentTemplateItem/portal_components/document.erp5.JioApiConnector.py
...teItem/portal_components/document.erp5.JioApiConnector.py
+1
-1
No files found.
bt5/erp5_jio_connector/DocumentTemplateItem/portal_components/document.erp5.JioApiConnector.py
View file @
db87b0a9
...
@@ -53,7 +53,7 @@ class JioApiConnector(XMLObject):
...
@@ -53,7 +53,7 @@ class JioApiConnector(XMLObject):
def
_sendToApi
(
self
,
path
,
request_dict
):
def
_sendToApi
(
self
,
path
,
request_dict
):
get_url
=
self
.
getUrlString
()
+
path
get_url
=
self
.
getUrlString
()
+
path
user_credentials
=
(
self
.
getUserId
(),
self
.
getPassword
())
user_credentials
=
(
self
.
getUserId
(),
self
.
getPassword
())
r
=
requests
.
post
(
get_url
,
json
=
request_dict
,
auth
=
user_credentials
)
r
=
requests
.
post
(
get_url
,
json
=
request_dict
,
auth
=
user_credentials
,
timeout
=
5
)
# Return response when status code is as expected
# Return response when status code is as expected
if
r
.
status_code
in
[
200
,
201
]:
if
r
.
status_code
in
[
200
,
201
]:
...
...
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