session and cookie examples
This commit is contained in:
46
examples/session-and-cookie/frontend/public/index.css
Normal file
46
examples/session-and-cookie/frontend/public/index.css
Normal file
@@ -0,0 +1,46 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body>* {
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
width: 450px;
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
.buttons>button {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 10px;
|
||||
padding: 20px;
|
||||
width: calc(50% - 20px);
|
||||
background: #3178c6;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.buttons>button:hover {
|
||||
background: #5ea8e9;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #333;
|
||||
width: 450px;
|
||||
padding: 20px;
|
||||
min-height: 100px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
text-align: left;
|
||||
border-radius: 4px;
|
||||
}
|
29
examples/session-and-cookie/frontend/public/index.html
Normal file
29
examples/session-and-cookie/frontend/public/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>TSRPC Example</title>
|
||||
<link rel="stylesheet" href="index.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Session and Cookie</h1>
|
||||
|
||||
<div class="buttons">
|
||||
<button id="btnTest">Test</button>
|
||||
<button id="btnClear">Clear</button>
|
||||
<button id="btnGetSession">Get Session</button>
|
||||
<button id="btnGetCookie">Get Cookie</button>
|
||||
</div>
|
||||
|
||||
<h2>API Request</h2>
|
||||
<pre class="apiReq"></pre>
|
||||
|
||||
<h2>API Return</h2>
|
||||
<pre class="apiReturn"></pre>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user