docs: def put(self, robj, w=None, dw=None, pw=None, return_body=True,
              if_none_match=False, timeout=None):
          """
          Puts a (possibly new) object.
          """
          # We could detect quorum_controls here but HTTP ignores
          # unknown flags/params.
          params = {'returnbody': return_body, 'w': w, 'dw': dw, 'pw': pw,
                    'timeout': timeout}
  
          bucket_type = self._get_bucket_type(robj.bucket.bucket_type)
  
          url = self.object_path(robj.bucket.name, robj.key,
                                 bucket_type=bucket_type,
                                 **params)
          headers = self._build_put_headers(robj, if_none_match=if_none_match)
          if PY2:
              content = bytearray(robj.encoded_data)
          else:
              content = robj.encoded_data
  
          if robj.key is None:
              expect = [201]
              method = 'POST'
          else:
              expect = [204]
              method = 'PUT'
  
          response = self._request(method, url, headers, content)
          if return_body:
              return self._parse_body(robj, response, [200, 201, 204, 300])
          else:
              self.check_http_code(response[0], expect)
              return None