Commit e5d20632 authored by Muskan Srivastava's avatar Muskan Srivastava
Browse files

made small change in HttpClientAzure

parent d1b230de
Pipeline #47904 passed with stages
in 10 minutes and 6 seconds
...@@ -21,6 +21,7 @@ import org.opengroup.osdu.core.common.http.IHttpClient; ...@@ -21,6 +21,7 @@ import org.opengroup.osdu.core.common.http.IHttpClient;
import org.opengroup.osdu.core.common.http.HttpResponse; import org.opengroup.osdu.core.common.http.HttpResponse;
import org.opengroup.osdu.core.common.http.UrlFetchServiceImpl; import org.opengroup.osdu.core.common.http.UrlFetchServiceImpl;
import org.opengroup.osdu.core.common.model.http.AppException; import org.opengroup.osdu.core.common.model.http.AppException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -31,8 +32,10 @@ import java.net.URISyntaxException; ...@@ -31,8 +32,10 @@ import java.net.URISyntaxException;
*/ */
@Primary @Primary
@Component @Component
public class HttpClientAzure extends UrlFetchServiceImpl implements IHttpClient { public class HttpClientAzure implements IHttpClient {
@Autowired
private UrlFetchServiceImpl urlFetchService;
/** /**
* calls urlfetchservice's send request. * calls urlfetchservice's send request.
* *
...@@ -43,7 +46,7 @@ public class HttpClientAzure extends UrlFetchServiceImpl implements IHttpClient ...@@ -43,7 +46,7 @@ public class HttpClientAzure extends UrlFetchServiceImpl implements IHttpClient
public HttpResponse send(final HttpRequest httpRequest) { public HttpResponse send(final HttpRequest httpRequest) {
org.opengroup.osdu.core.common.model.http.HttpResponse response = null; org.opengroup.osdu.core.common.model.http.HttpResponse response = null;
try { try {
response = super.sendRequest(FetchServiceHttpRequest.builder() response = this.urlFetchService.sendRequest(FetchServiceHttpRequest.builder()
.body(httpRequest.getBody()) .body(httpRequest.getBody())
.httpMethod(httpRequest.getHttpMethod()) .httpMethod(httpRequest.getHttpMethod())
.queryParams(httpRequest.getQueryParams()) .queryParams(httpRequest.getQueryParams())
......
Markdown is supported
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