Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
a2c47ef1
Commit
a2c47ef1
authored
Feb 24, 2020
by
Guilhem Saurel
Browse files
just show body
parent
61632180
Pipeline
#8459
passed with stage
in 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gh/views.py
View file @
a2c47ef1
...
...
@@ -2,6 +2,8 @@
import
hmac
from
hashlib
import
sha1
from
ipaddress
import
ip_address
,
ip_network
from
json
import
loads
from
pprint
import
pprint
import
requests
from
django.conf
import
settings
...
...
@@ -12,21 +14,8 @@ from django.views.decorators.csrf import csrf_exempt
def
log
(
request
:
HttpRequest
,
rep
:
str
=
'ok'
)
->
HttpResponse
:
"""Just print everything out."""
print
(
f
'
{
request
=
}
'
)
print
(
f
'
{
request
.
scheme
=
}
'
)
print
(
f
'
{
request
.
body
=
}
'
)
print
(
f
'
{
request
.
path
=
}
'
)
print
(
f
'
{
request
.
path_info
=
}
'
)
print
(
f
'
{
request
.
method
=
}
'
)
print
(
f
'
{
request
.
encoding
=
}
'
)
print
(
f
'
{
request
.
content_type
=
}
'
)
print
(
f
'
{
request
.
content_params
=
}
'
)
print
(
f
'
{
request
.
GET
=
}
'
)
print
(
f
'
{
request
.
POST
=
}
'
)
print
(
f
'
{
request
.
COOKIES
=
}
'
)
print
(
f
'
{
request
.
META
=
}
'
)
print
(
f
'
{
request
.
headers
=
}
'
)
"""Just print the body."""
pprint
(
loads
(
request
.
body
.
decode
()))
return
HttpResponse
(
rep
)
...
...
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