jleung51-coursework / phaser

C++ servers utilizing the Microsoft Azure Storage Client Library.
MIT License
1 stars 0 forks source link

Implement BasicServer PUT UpdateProperty operation #12

Open jleung51 opened 8 years ago

jleung51 commented 8 years ago

As specified in Assignment 1: Optional added operations:

  1. [...]
  2. Update the specified property in all entities
    • HTTP method: PUT (new code called from function handle_put())
    • Operation: UpdateProperty
    • Parameters: Table name
    • Body: JSON object with a single name / value pair. If an entity has a property matching the specified name, the value of that property is set to the specified value. For example, given an message body of {"visited": "yes"}, this operation would search every entity in the specified table, ignoring those that did not have a property visited, and for those entities having the property visited, setting it to "yes".
    • Response codes:
      • status_codes::BadRequest (400): Missing table name, missing JSON body
      • status_codes::NotFound (404): Table does not exist
      • status_codes::OK (200): Table found and all entities with the specified property name set to the specified value