protected < T > ResponseEntity < T > sendRequest ( String pathFragment , HttpMethod method , List < ? extends NameValuePair > getParams , Object postData , Class < T > returnType ) { HttpHeaders headers = new HttpHeaders ( ) ; headers . add ( XAPI_VERSION_HEADER , XAPI_VERSION_VALUE ) ; // make multipart data is handled correctly. if ( postData instanceof MultiValueMap ) { headers . setContentType ( MediaType . MULTIPART_FORM_DATA ) ; } URI fullURI = buildRequestURI ( pathFragment , getParams ) ; HttpEntity < ? > entity = new HttpEntity <> ( postData , headers ) ; ResponseEntity < T > response = restTemplate . exchange ( fullURI , method , entity , returnType ) ; return response ; }
Send a request to the LRS .