Skip to content
Snippets Groups Projects
Commit cf78c1ec authored by Ashutosh Shimpi's avatar Ashutosh Shimpi
Browse files

- Updated spring-web version compatible with exisitng data-api

- Changed code accordingly
parent fe62ea0c
No related branches found
No related tags found
No related merge requests found
Pipeline #279314 passed with stage
in 43 seconds
......@@ -89,7 +89,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.2.7.RELEASE</version>
<version>4.3.13.RELEASE</version>
</dependency>
</dependencies>
......
......@@ -29,6 +29,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.util.UriComponentsBuilder;
import uk.ac.ebi.ega.fire.exceptions.ClientProtocolException;
import uk.ac.ebi.ega.fire.exceptions.FireServiceException;
import uk.ac.ebi.ega.fire.listener.ProgressListener;
......@@ -54,8 +55,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import static java.nio.charset.Charset.defaultCharset;
import static org.springframework.web.util.UriUtils.encodeFragment;
import static uk.ac.ebi.ega.fire.utils.FireUtils.getObjectMapper;
public class FireService implements IFireService {
......@@ -123,8 +122,15 @@ public class FireService implements IFireService {
firePath = firePath.substring(1);
}
// build http request and assign multipart upload data
final String encodedFirePath = UriComponentsBuilder
.newInstance()
.fragment(firePath)
.build()
.encode()
.getFragment();
final HttpUriRequest request = RequestBuilder
.get(fireURL + PATH_OBJECTS_QUERY_BY_PATH + encodeFragment(firePath, defaultCharset()))
.get(fireURL + PATH_OBJECTS_QUERY_BY_PATH + encodedFirePath)
.build();
try (final CloseableHttpResponse httpResponse = httpClient.execute(request)) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment