github.com/speedoops/go-gqlrest-demo@v0.0.0-20220710122636-5c6460aeab4f/rest_test.http (about)

     1  ###############################
     2  # REST style 1, well supported
     3  ###############################
     4  
     5  ###
     6  GET http://localhost:8080/api/v1/todos?userId2=userId2&text2=text2&done2=true
     7  
     8  ###
     9  GET http://localhost:8080/api/v1/todos?ids=T9527&ids=T3916 589616287113937&userId2=1,2,33&text2=text2&done2=true&done2=false
    10  
    11  ###
    12  POST http://localhost:8080/api/v1/todos
    13  content-type: application/json
    14  
    15  {"input": {"userID":"uid", "text":"$text"}}
    16  
    17  ###
    18  PUT http://localhost:8080/api/v1/todo/T9527
    19  content-type: application/json
    20  
    21  {"input": {"userID":"uid", "text":"$text.Updated"}}
    22  
    23  ###
    24  DELETE http://localhost:8080/api/v1/todo/T95270
    25  
    26  ### 
    27  GET http://localhost:8080/api/v1/todos?ids=T9527&userId2=userId2&text2=text2&done2=true
    28  
    29  
    30  ###############################
    31  # REST style 2, not supported yet
    32  ###############################
    33  
    34  ###
    35  POST http://localhost:8080/api/v1/todos HTTP/1.1
    36  content-type: application/json
    37  
    38  {
    39      "userID":"uid",
    40      "text":"text",
    41      "done": false
    42  }
    43  
    44  ###
    45  POST http://localhost:8080/api/v1/todo/{id}/complete HTTP/1.1
    46  content-type: application/json
    47  
    48  {
    49      "userID":"uid",
    50      "text":"text",
    51      "done": false
    52  }
    53  
    54  ###
    55  POST http://localhost:8080/api/v1/todos/bulk-complete HTTP/1.1
    56  content-type: application/json
    57  
    58  {
    59      "ids":["T9527","xx"]
    60  }
    61  
    62  ###
    63  # PUT http://localhost:8080/api/v1/todos/T9527?verbose=true&lang=zh-CN HTTP/1.1
    64  PUT http://localhost:8080/api/v1/todo/T9527
    65  content-type: application/json
    66  
    67  {
    68      "userID":"uid0", 
    69      "text":"textPUT"
    70  }
    71  
    72  ###
    73  GET http://localhost:8080/api/v1/todos?ids=1,2,3,4&ids=5,6
    74  
    75  ###
    76  GET http://localhost:8080/api/v1/non-exist?ids=1,2,3,4&ids=5,6
    77  
    78  ###
    79  DELETE http://localhost:8080/api/v1/todos/uid0
    80  
    81  
    82  
    83  
    84  ###
    85  GET http://localhost:8080/api/v1/overlapping