FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
castle-python/castle/api_request.py at develop · hbnworkstation/castle-python · GitHub
hbnworkstation
/
castle-python
Public
forked from
castle/castle-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
castle-python
/
castle
/
api_request.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (13 loc) · 616 Bytes
Breadcrumbs
castle-python
/
castle
/
api_request.py
Copy path
File metadata and controls
17 lines (13 loc) · 616 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from
castle
.
core
.
send_request
import
CoreSendRequest
from
castle
.
core
.
process_response
import
CoreProcessResponse
from
castle
.
configuration
import
configuration
from
castle
.
errors
import
ConfigurationError
class
APIRequest
(
object
):
def
__init__
(
self
):
self
.
req
=
CoreSendRequest
({
'Content-Type'
:
'application/json'
})
def
request
(
self
,
command
):
if
not
configuration
.
isValid
():
raise
ConfigurationError
return
self
.
req
.
build_query
(
command
.
method
,
command
.
path
,
command
.
data
)
def
call
(
self
,
command
):
return
CoreProcessResponse
(
self
.
request
(
command
)).
call
()
Back
|
FazBrowse Home
|
New Git URL