Skip to content

bastelfreak/http2jsonfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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": [

  ]
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages