12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229 |
- <!DOCTYPE html>
- <html>
- <head lang="en">
- <title> API Documentation </title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
- <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
- <style type="text/css">
- body {
- font-family: 'Roboto', sans-serif;
- }
- .hidden {
- display:none;
- }
- pre {
- outline: 1px solid #ccc;
- padding: 5px; margin: 5px;
- }
- .string { color: green; }
- .number { color: darkorange; }
- .boolean { color: blue; }
- .null { color: magenta; }
- .key { color: red; }
- </style>
- <style type="text/css">
- pre.prettyprint {
- border: 1px solid #ccc;
- margin-bottom: 0;
- padding: 9.5px;
- }
- </style>
- <script>
- function syntaxHighlight(json) {
- json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
- return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
- var cls = 'number';
- if (/^"/.test(match)) {
- if (/:$/.test(match)) {
- cls = 'key';
- } else {
- cls = 'string';
- }
- } else if (/true|false/.test(match)) {
- cls = 'boolean';
- } else if (/null/.test(match)) {
- cls = 'null';
- }
- return '<span class="' + cls + '">' + match + '</span>';
- });
- }
- function spaceJson(json){
- var validJson = JSON.parse(json);
- return JSON.stringify(validJson, undefined, 4);
- }
- </script>
- </head>
- <body>
- <nav class="navbar navbar-default navbar-fixed-top">
- <div class="container-fluid">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
- data-target="#bs-example-navbar-collapse-1">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="#">Gin</a>
- <p class="navbar-text">Developed by Gophers at <a href="http://betacraft.co">Betacraft</a></p>
- </div>
- </div>
- </nav>
- <div class="container-fluid" style="margin-top: 70px;margin-bottom: 20px;">
- <div class="container-fluid">
- <div class="col-md-4">
- <div class="panel panel-default">
- <div class="panel-heading">Base Urls</div>
- <div class="panel-body">
- <p>Production : <strong>/api/v1</strong></p>
- <p>Staging : <strong>/api/v1</strong></p>
- </div>
- </div>
- <ul class="nav nav-pills nav-stacked" role="tablist">
- <li role="presentation"><a href="#0top" role="tab" data-toggle="tab">POST : /api/v1/user/create</a></li>
- <li role="presentation"><a href="#1top" role="tab" data-toggle="tab">PUT : /api/v1/user/update</a></li>
- <li role="presentation"><a href="#2top" role="tab" data-toggle="tab">PUT : /api/v1/user/cgpasswd</a></li>
- <li role="presentation"><a href="#3top" role="tab" data-toggle="tab">GET : /api/v1/user/users</a></li>
- <li role="presentation"><a href="#4top" role="tab" data-toggle="tab">POST : /api/v1/user/login</a></li>
- <li role="presentation"><a href="#5top" role="tab" data-toggle="tab">GET : /api/v1/user/logout</a></li>
- <li role="presentation"><a href="#6top" role="tab" data-toggle="tab">GET : /api/v1/user/auth_session</a></li>
- <li role="presentation"><a href="#7top" role="tab" data-toggle="tab">GET : /api/v1/user/current</a></li>
- <li role="presentation"><a href="#8top" role="tab" data-toggle="tab">GET : /api/v1/user/u/3</a></li>
- <li role="presentation"><a href="#9top" role="tab" data-toggle="tab">GET : /api/v1/user/u/4</a></li>
- <ul>
- </div>
- <div class="col-md-8 tab-content">
- <div id="0top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-0-0" class="prettyprint">{"name": "test","password": "test"}</pre>
- <script>
- var requestHeader ={"Content-Type":" application/json\r","X-Forwarded-For":" "};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"name\": \"test\",\"password\": \"test\"}");
- document.getElementById('request-body0-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">400</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-0-0">{"error":"Key: 'APIUserInput.Cnname' Error:Field validation for 'Cnname' failed on the 'required' tag\nKey: 'APIUserInput.Email' Error:Field validation for 'Email' failed on the 'required' tag"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"error\":\"Key: 'APIUserInput.Cnname' Error:Field validation for 'Cnname' failed on the 'required' tag\\nKey: 'APIUserInput.Email' Error:Field validation for 'Email' failed on the 'required' tag\"}");
- document.getElementById('response-body-0-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-0-1" class="prettyprint">{"name": "owltester","password": "mypassword", "cnname": "翱鶚", "email": "root123@cepave.com", "im": "44955834958", "phone": "99999999999", "qq": "904394234239"}</pre>
- <script>
- var requestHeader ={"Content-Type":" application/json\r","X-Forwarded-For":" "};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"name\": \"owltester\",\"password\": \"mypassword\", \"cnname\": \"翱鶚\", \"email\": \"root123@cepave.com\", \"im\": \"44955834958\", \"phone\": \"99999999999\", \"qq\": \"904394234239\"}");
- document.getElementById('request-body0-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-0-1">{"name":"owltester","sig":"9b42a728c0ea11e690c5001500c6ca5a"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"name\":\"owltester\",\"sig\":\"9b42a728c0ea11e690c5001500c6ca5a\"}");
- document.getElementById('response-body-0-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="1top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>Cookie</td>
- <td> name=test1; sig=d4f71cba377911e699d60242ac110010
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-1-0" class="prettyprint">{"name": "test1","password": "test1", "cnname": "翱鶚Test", "email": "root123@cepave.com", "im": "44955834958", "phone": "99999999999", "qq": "904394234239"}</pre>
- <script>
- var requestHeader ={"Content-Type":" application/json\r","Cookie":" name=test1; sig=d4f71cba377911e699d60242ac110010\r","X-Forwarded-For":" "};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"name\": \"test1\",\"password\": \"test1\", \"cnname\": \"翱鶚Test\", \"email\": \"root123@cepave.com\", \"im\": \"44955834958\", \"phone\": \"99999999999\", \"qq\": \"904394234239\"}");
- document.getElementById('request-body1-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-1-0">{"message":"user info updated"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"user info updated\"}");
- document.getElementById('response-body-1-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="2top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>Cookie</td>
- <td> name=test1; sig=d4f71cba377911e699d60242ac110010
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-2-0" class="prettyprint">{"new_password": "test1", "old_password": "test1"}</pre>
- <script>
- var requestHeader ={"Content-Type":" application/json\r","Cookie":" name=test1; sig=d4f71cba377911e699d60242ac110010\r","X-Forwarded-For":" "};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"new_password\": \"test1\", \"old_password\": \"test1\"}");
- document.getElementById('request-body2-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-2-0">{"message":"password updated!"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"password updated!\"}");
- document.getElementById('response-body-2-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="3top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Cookie</td>
- <td> name=test1; sig=d4f71cba377911e699d60242ac110010
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-3-0">[{"id":1,"name":"root","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":2},{"id":2,"name":"yao104","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":3,"name":"xiecz","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":4,"name":"test1","cnname":"翱鶚Test","email":"root123@cepave.com","phone":"99999999999","im":"44955834958","qq":"904394234239","role":0},{"id":5,"name":"don","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":6,"name":"masato","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":7,"name":"cepave1","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":9,"name":"test2","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":10,"name":"kordan","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":11,"name":"laurence","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":12,"name":"kelly","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":13,"name":"masato25","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":0},{"id":14,"name":"myhung","cnname":"","email":"","phone":"","im":"","qq":"904394234239","role":1},{"id":32,"name":"owltester","cnname":"翱鶚","email":"root123@cepave.com","phone":"99999999999","im":"44955834958","qq":"904394234239","role":0}]</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("[{\"id\":1,\"name\":\"root\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":2},{\"id\":2,\"name\":\"yao104\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":3,\"name\":\"xiecz\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":4,\"name\":\"test1\",\"cnname\":\"翱鶚Test\",\"email\":\"root123@cepave.com\",\"phone\":\"99999999999\",\"im\":\"44955834958\",\"qq\":\"904394234239\",\"role\":0},{\"id\":5,\"name\":\"don\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":6,\"name\":\"masato\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":7,\"name\":\"cepave1\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":9,\"name\":\"test2\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":10,\"name\":\"kordan\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":11,\"name\":\"laurence\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":12,\"name\":\"kelly\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":13,\"name\":\"masato25\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":14,\"name\":\"myhung\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":1},{\"id\":32,\"name\":\"owltester\",\"cnname\":\"翱鶚\",\"email\":\"root123@cepave.com\",\"phone\":\"99999999999\",\"im\":\"44955834958\",\"qq\":\"904394234239\",\"role\":0}]");
- document.getElementById('response-body-3-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="4top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p> <H4> URL Params </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>name</td>
- <td> gg123</td>
- </tr>
- <tr>
- <td>password</td>
- <td> willnotpass</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">400</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-4-0">{"error":"password error"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"error\":\"password error\"}");
- document.getElementById('response-body-4-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p> <H4> URL Params </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>name</td>
- <td> test2</td>
- </tr>
- <tr>
- <td>password</td>
- <td> test2</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-4-1">{"sig":"9d791331c0ea11e690c5001500c6ca5a","name":"test2","admin":false}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"sig\":\"9d791331c0ea11e690c5001500c6ca5a\",\"name\":\"test2\",\"admin\":false}");
- document.getElementById('response-body-4-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="5top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Cookie</td>
- <td> name=test2; sig=9d791331c0ea11e690c5001500c6ca5a
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-5-0">{"message":"logout successful"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"logout successful\"}");
- document.getElementById('response-body-5-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="6top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Cookie</td>
- <td> name=test1; sig=d4f71cba377911e699d60242ac110010
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-6-0">{"message":"session is vaild!"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"session is vaild!\"}");
- document.getElementById('response-body-6-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Cookie</td>
- <td> name=testtest; sig=9a84ae1d377911e699d60242ac110010
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> </td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">401</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type,Token</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-6-1">{"error":"not found this user"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Headers":"Content-Type,Token","Access-Control-Allow-Origin":"*","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"error\":\"not found this user\"}");
- document.getElementById('response-body-6-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="7top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-7-0">{"id":2,"name":"root","cnname":"","email":"","phone":"","im":"","qq":"","role":2}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"id\":2,\"name\":\"root\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"\",\"role\":2}");
- document.getElementById('response-body-7-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="8top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">417</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-8-0">{"error":"record not found"}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"error\":\"record not found\"}");
- document.getElementById('response-body-8-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="9top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-9-0">{"id":4,"name":"userA","cnname":"tear","email":"","phone":"","im":"","qq":"","role":0}</pre>
- <script>
- var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"id\":4,\"name\":\"userA\",\"cnname\":\"tear\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"\",\"role\":0}");
- document.getElementById('response-body-9-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- </div>
- </div>
- </div>
- <hr>
- </body>
- </html>
|