Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Log in</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- </head>
- <body>
- <p id="demo">This is a paragra.</p>
- <button id="but1">addShips</button>
- <button id="but2">log in</button>
- <button id="but3">getShip by id</button>
- <button id="del">delete</button>
- <button id="reg">Reg</button>
- <button id="confirm">confirm</button>
- <script>
- $(document).ready(function(){
- $("#but1").click(function(){
- $.post("https://someleltest.herokuapp.com/api/ships",
- {
- "SID":"baa94319474c00240dc32f4fea7f0f513a394f6775f6e1c34765d2c51917b15a",
- "ship":{
- "location":"Earth",
- "capacity":1000,
- "volume":100321,
- "ability":"everywhere",
- "speed": 1000,
- "consumption":5
- }
- },
- function(data,status){
- console.log(status);
- });
- });
- //39f8eb913de2e5908a1fe0b3b57341e3197630e0bbdb5061be089731d99edb31
- $("#but2").click(function()
- {
- $.post("https://someleltest.herokuapp.com/api/users",
- {
- "email":"r49587@mvrht.net",
- "password":"test123"
- },
- function (data){
- console.log(data);
- }
- )
- })
- $("#but3").click(function ()
- {
- $.get("https://someleltest.herokuapp.com/api/ships?SID=7852eee773a1a6a978855180a10d65908a4393908cd61c8dc3dabd660cd086f1",
- function (data,status)
- {
- console.log(status);
- }
- )
- })
- $("#del").click(function ()
- {
- });
- $("#reg").click(function(){
- $.post("https://someleltest.herokuapp.com/api/users/register",
- {
- "email":"r49587@mvrht.net",
- "password":"test123"
- },
- function(data,status){
- console.log(status);
- }
- )
- })
- $("#confirm").click(function (){
- $.post("https://someleltest.herokuapp.com/api/users/confirm",
- {
- "email":"r49587@mvrht.net",
- "confirm":"30739624"
- }),
- function (status){
- console.log(status);
- }
- })
- $("addOperator").click(function()
- {
- $.post("https://someleltest.herokuapp.com/api/users/addOperator",
- {
- "SID":
- })
- })
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement