Skip to content

Latest commit

 

History

History
71 lines (56 loc) · 979 Bytes

File metadata and controls

71 lines (56 loc) · 979 Bytes

http2jsonfile

microservice with a sinatra http listener, that updates a local json file

Usage

Get all hashtags

curl -H "Accept: application/json" http://127.0.0.1:4567/json

returns:

{
  "hashtags": [
    "tatort",
    "jamaika",
    "svwh96",
    "rannfl",
    "aldi",
    "berlindirekt",
    "lidl",
    "werder",
    "bahn",
    "jamaikasondierung"
  ]
}

Update hashtags

curl -X POST -H "Accept: application/json" -d  '{"hashtags":["tatort","jamaika","svwh96","rannfl","aldi","berlindirekt","lidl","werder","bahn","jamaikasondierung"]}' http://127.0.0.1:4567/json

returns:

{
  "hashtags": [
    "tatort",
    "jamaika",
    "svwh96",
    "rannfl",
    "aldi",
    "berlindirekt",
    "lidl",
    "werder",
    "bahn",
    "jamaikasondierung"
  ]
}

Delete all hashtags

curl -X DELETE -H "Accept: application/json" http://127.0.0.1:4567/json

returns:

{
  "hashtags": [

  ]
}