public function getRequest($operationConfig, $operationMetadata, &$inputMap) {
        
        $action = $operationConfig->getAction();
        $resourcePath = $operationConfig->getResourcePath();
        $headerList = $operationConfig->getHeaderParams();
        $queryList = $operationConfig->getQueryParams();
        
        //arizzini: store seperately the header paramters
        $headerMap = Util::subMap($inputMap, $headerList);
        
        $url = $this->getUrl($operationConfig, $operationMetadata, $inputMap);
        
                
//        echo "-------------------------------------\n";
//        echo "-------------------------------------\n";
//        echo "url: $url \n";
//        echo "-------------------------------------\n";
//        echo "-------------------------------------\n";

        $contentType = "application/json; charset=utf-8";
        if (!empty($operationMetadata->getContentTypeOverride())) {
            $contentType = $operationMetadata->getContentTypeOverride()."; charset=utf-8";
        }
        
        
        $request = null;
        $requestBody = null;
        if (!empty($inputMap)) {
            $requestBody = json_encode($inputMap);
        } else {
            $requestBody = "{}";
        }

        switch ($action) {
            case "create":
                $request = new Request("POST", $url, [], $requestBody);
                $request = $request->withHeader("Content-Type", $contentType);
                break;
            case "delete":
                $request = new Request("DELETE", $url);
                break;
            case "update":
                $request = new Request("PUT", $url, [], $requestBody);
                $request = $request->withHeader("Content-Type", $contentType);
                break;
            case "read":
            case "list":
            case "query":
                $request = new Request("GET", $url);
                break;
        }
        
        $request = $request->withHeader("Accept", $contentType);
        $request = $request->withHeader("User-Agent", Constants::getCoreVersion() ."/". $operationMetadata->getApiVersion());
        foreach ($headerMap as $key => $value) {
            $request = $request->withHeader($key, $value);    
        }
        $request = ApiConfig::getAuthentication()->signRequest($url, $request);

        return $request;
    }