Executes a PUT.

        'path' may not be None. Should include the full path to the
        resoure.
        'data' may be None or a dictionary.

        Returns a named tuple that includes:

        status: the HTTP status code
        json: the returned JSON-HAL

        If the key was not set, throws an APIConfigurationException.

def put(self, path, data):
        """Executes a PUT.

        'path' may not be None. Should include the full path to the
        resoure.
        'data' may be None or a dictionary.

        Returns a named tuple that includes:

        status: the HTTP status code
        json: the returned JSON-HAL

        If the key was not set, throws an APIConfigurationException."""

        # Argument error checking.
        assert path is not None
        assert data is None or isinstance(data, dict)

        # Execute the request.
        if data is None:
            data = {}
        response = self.conn.request_encode_body('PUT', path, data,
                                                 self._get_headers(), False)

        # Extract the result.
        self._last_status = response_status = response.status
        response_content = response.data.decode()

        return Result(status=response_status, json=response_content)