github.com/grafviktor/keep-my-secret@v0.9.10-0.20230908165355-19f35cce90e5/misc/test_api_handlers.http (about)

     1  ### Get frontend application
     2  GET https://localhost:8080/ HTTP/1.1
     3  
     4  ### Register
     5  POST https://localhost:8080/user/register HTTP/1.1
     6  content-type: application/json
     7  
     8  {
     9      "username": "roman",
    10      "password": "1"
    11  }
    12  
    13  ### Login
    14  # Don't forget to register first
    15  POST https://localhost:8080/user/login HTTP/1.1
    16  content-type: application/json
    17  
    18  {
    19      "username": "roman",
    20      "password": "1"
    21  }
    22  
    23  ### Logout
    24  POST https://localhost:8080/user/logout HTTP/1.1
    25  
    26  ###
    27  POST https://localhost:8080/ HTTP/1.1
    28  cookie: auth=0
    29  content-type: text/plain
    30  
    31  http://www.mail1.ru
    32  
    33  ###
    34  
    35  POST https://localhost:8080/api/shorten/batch HTTP/1.1
    36  content-type: application/json
    37  
    38  [
    39    {
    40      "correlation_id": "id1",
    41      "original_url": "www.mail1.ru1"
    42    },
    43    {
    44      "correlation_id": "id2",
    45      "original_url": "www.mail2.ru2"
    46    }
    47  ]
    48