Commit 5ea29983 authored by Hema Vishnu Pola [Microsoft]'s avatar Hema Vishnu Pola [Microsoft]
Browse files

Merge branch 'muskans-corelibazure-retry' into 'master'

Made changes to do composition of UrlFetchService instead of inheriting it in HttpClientAzure

See merge request !119
parents df6bf488 65c36b42
Pipeline #48194 passed with stages
in 10 minutes and 16 seconds
......@@ -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.UrlFetchServiceImpl;
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.stereotype.Component;
......@@ -31,8 +32,10 @@ import java.net.URISyntaxException;
*/
@Primary
@Component
public class HttpClientAzure extends UrlFetchServiceImpl implements IHttpClient {
public class HttpClientAzure implements IHttpClient {
@Autowired
private UrlFetchServiceImpl urlFetchService;
/**
* calls urlfetchservice's send request.
*
......@@ -43,7 +46,7 @@ public class HttpClientAzure extends UrlFetchServiceImpl implements IHttpClient
public HttpResponse send(final HttpRequest httpRequest) {
org.opengroup.osdu.core.common.model.http.HttpResponse response = null;
try {
response = super.sendRequest(FetchServiceHttpRequest.builder()
response = this.urlFetchService.sendRequest(FetchServiceHttpRequest.builder()
.body(httpRequest.getBody())
.httpMethod(httpRequest.getHttpMethod())
.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