Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
http-request-component
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dasharatha.vamshi
http-request-component
Commits
02e2153a
Commit
02e2153a
authored
Feb 22, 2021
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
5cdb5a24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
main.py
main.py
+1
-1
scripts/common/config_parser.py
scripts/common/config_parser.py
+7
-7
No files found.
main.py
View file @
02e2153a
...
...
@@ -58,7 +58,7 @@ class RequestComponent:
self
.
s
.
mount
(
RequestConstants
.
HTTP
,
adapter
)
# ---------------------- Sending Request -----------------------------------------------------------------------
print
(
query
)
logger
.
info
(
query
)
try
:
if
query
[
RequestConstants
.
Request_method
]
.
upper
()
==
RequestConstants
.
Method_get
:
# response = requests.request(RequestConstants.Method_get, url=request_url, headers=request_headers,
...
...
scripts/common/config_parser.py
View file @
02e2153a
...
...
@@ -22,13 +22,13 @@ if not os.path.exists(os.path.join(os.getcwd(), 'logs')):
LOG_LEVEL
=
os
.
environ
.
get
(
"LOG_LEVEL"
,
_config
.
get
(
'SERVICE_CONFIG'
,
{})
.
get
(
"LOG_LEVEL"
,
"INFO"
))
.
upper
()
LOG_HANDLER_NAME
=
_config
.
get
(
'SERVICE_CONFIG'
,
{})
.
get
(
"LOG_HANDLER_NAME"
,
"HttpRequestComponent"
)
os
.
environ
[
'shared_volume'
]
=
'test'
os
.
environ
[
'method'
]
=
'POST'
os
.
environ
[
'url'
]
=
'http://localhost:5000/get'
os
.
environ
[
'headers'
]
=
'{"content-type":"application/json"}'
os
.
environ
[
'payload'
]
=
'{"name": "vamshi", "gender": "male"}'
os
.
environ
[
'max_retries'
]
=
'1'
os
.
environ
[
'authentication'
]
=
'{"username":"vamshi","password":"sai"}'
#
os.environ['shared_volume'] = 'test'
#
os.environ['method'] = 'POST'
#
os.environ['url'] = 'http://localhost:5000/get'
#
os.environ['headers'] = '{"content-type":"application/json"}'
#
os.environ['payload'] = '{"name": "vamshi", "gender": "male"}'
#
os.environ['max_retries'] = '1'
#
os.environ['authentication'] = '{"username":"vamshi","password":"sai"}'
config
=
{
"shared_volume"
:
os
.
environ
.
get
(
"shared_volume"
),
"method"
:
os
.
environ
.
get
(
"method"
),
...
...
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