public function put($source = 'php://input', $sanitize = true)
    {
        if (is_null($source)) {
            $source = 'php://input';
        }

        $source = @fopen($source, 'r');

        if (!is_resource($source)) {
            throw new InvalidArgumentException('Expected parameter 1 to be an open-able resource');
        }

        $data = null;

        while ($buffer = fread($source, 1024)) {
            $data .= $buffer;
        }

        fclose($source);

        return $sanitize ? filter_var($data, FILTER_SANITIZE_STRING) : $data;
    }