Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Kunto
/
backoffice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 98b0c172
authored
Jul 31, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
auto-push
1 parent
e0a71434
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
src/agratek/api/merchant/views/odeo.py
src/agratek/api/merchant/views/odeo.py
View file @
98b0c17
...
@@ -26,10 +26,10 @@ class Vendor(VendorClass):
...
@@ -26,10 +26,10 @@ class Vendor(VendorClass):
def
request_post
(
self
,
params
,
url
=
None
):
def
request_post
(
self
,
params
,
url
=
None
):
headers
=
{
'Authorization'
:
'Bearer {key}'
.
format
(
key
=
self
.
auth
)}
headers
=
{
'Authorization'
:
'Bearer {key}'
.
format
(
key
=
self
.
auth
)}
data
=
json
.
dumps
(
params
)
data
=
json
.
dumps
(
params
)
self
.
url
=
url
and
self
.
url
+
url
or
self
.
url
url
=
url
and
self
.
url
+
url
or
self
.
url
try
:
try
:
with
requests
.
session
():
with
requests
.
session
():
resp
=
requests
.
post
(
self
.
url
,
data
=
data
,
resp
=
requests
.
post
(
url
,
data
=
data
,
verify
=
False
,
headers
=
headers
)
verify
=
False
,
headers
=
headers
)
except
:
except
:
resp
=
None
resp
=
None
...
@@ -38,11 +38,11 @@ class Vendor(VendorClass):
...
@@ -38,11 +38,11 @@ class Vendor(VendorClass):
def
request_get
(
self
,
params
,
url
=
None
):
def
request_get
(
self
,
params
,
url
=
None
):
headers
=
{
'Authorization'
:
'Bearer {key}'
.
format
(
key
=
self
.
auth
)}
headers
=
{
'Authorization'
:
'Bearer {key}'
.
format
(
key
=
self
.
auth
)}
self
.
url
=
url
and
self
.
url
+
url
or
self
.
url
url
=
url
and
self
.
url
+
url
or
self
.
url
try
:
try
:
with
requests
.
session
():
with
requests
.
session
():
resp
=
requests
.
get
(
self
.
url
,
params
=
params
,
resp
=
requests
.
get
(
url
,
params
=
params
,
verify
=
False
,
headers
=
headers
)
verify
=
False
,
headers
=
headers
)
except
:
except
:
resp
=
None
resp
=
None
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment