@Test public void shouldReturnEmptyListForEmptyEntity() throws IOException { InputStream stream = new ByteArrayInputStream("".getBytes()); assertTrue(toTest.extract(null, UTF8, stream).isEmpty()); }
public List<EncodedPair> extract(String contentType, Charset charset, InputStream entity) throws IOException { String formContent = IOs.toString(entity, charset); if(isNotBlank(formContent)) { return fromUrlEncoded(formContent); }else{ return emptyList(); } }
UrlEncodedFormEntityParamExtractor implements EntityParamExtractor { public List<EncodedPair> extract(String contentType, Charset charset, InputStream entity) throws IOException { String formContent = IOs.toString(entity, charset); if(isNotBlank(formContent)) { return fromUrlEncoded(formContent); }else{ return emptyList(); } } }
UrlEncodedFormEntityParamExtractor implements EntityParamExtractor { public List<EncodedPair> extract(String contentType, Charset charset, InputStream entity) throws IOException { String formContent = IOs.toString(entity, charset); if(isNotBlank(formContent)) { return fromUrlEncoded(formContent); }else{ return emptyList(); } }  }
UrlEncodedFormEntityParamExtractor implements EntityParamExtractor { public List<EncodedPair> extract(String contentType, Charset charset, InputStream entity) throws IOException { String formContent = IOs.toString(entity, charset); if(isNotBlank(formContent)) { return fromUrlEncoded(formContent); }else{ return emptyList(); } }  List<EncodedPair> extract(String contentType, Charset charset, InputStream entity); }
UrlEncodedFormEntityParamExtractor implements EntityParamExtractor { public List<EncodedPair> extract(String contentType, Charset charset, InputStream entity) throws IOException { String formContent = IOs.toString(entity, charset); if(isNotBlank(formContent)) { return fromUrlEncoded(formContent); }else{ return emptyList(); } }  List<EncodedPair> extract(String contentType, Charset charset, InputStream entity);  }