Refactored HTTP headers to be defined once in self.header.
Refactored put calls to one common method handle_put.
For each context [device,shared,structure] this is a helper function.
The constants have been moved to these helper functions.
Refactored put requests.