FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/unittests/issue517.py at cefpython147 · cztomczak/cefpython · GitHub
cztomczak
/
cefpython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
477
Star
3.2k
Code
Issues
223
Pull requests
4
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
unittests
/
issue517.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
43 lines (37 loc) · 871 Bytes
Breadcrumbs
cefpython
/
unittests
/
issue517.py
Copy path
File metadata and controls
43 lines (37 loc) · 871 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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# coding=utf8
from
cefpython3
import
cefpython
as
cef
import
sys
html
=
"""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
window.onload = function() {
fetch('http://127.0.0.1:8000', {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: 'key=' + encodeURI('🍣 asd'),
}).then().catch();
}
</script>
</body>
</html>
"""
class
RequestHandler
:
def
GetResourceHandler
(
self
,
browser
,
frame
,
request
):
print
(
request
.
GetPostData
())
return
None
def
main
():
sys
.
excepthook
=
cef
.
ExceptHook
cef
.
Initialize
()
browser
=
cef
.
CreateBrowserSync
(
url
=
cef
.
GetDataUrl
(
html
))
browser
.
SetClientHandler
(
RequestHandler
())
cef
.
MessageLoop
()
del
browser
cef
.
Shutdown
()
if
__name__
==
'__main__'
:
main
()
Back
|
FazBrowse Home
|
New Git URL