diff options
Diffstat (limited to 'adapters/mso-nssmf-adapter/src')
2 files changed, 29 insertions, 2 deletions
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java index 28789f2a98..84e1eb2acc 100644 --- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java +++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java @@ -159,7 +159,7 @@ public class NssmfAdapterConsts { new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET)); urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.QUERY_SUB_NET_CAPABILITY), - new NssmfUrlInfo(INTERNAL_QUERY_SUB_NET_CAPABILITY, HttpMethod.POST)); + new NssmfUrlInfo(INTERNAL_QUERY_SUB_NET_CAPABILITY, HttpMethod.GET)); } /** diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java index a4a79bf2cd..432cfacb0b 100644 --- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java +++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java @@ -219,7 +219,11 @@ public class RestUtil { break; case GET: - base = new HttpGet(url); + HttpGetWithBody get = new HttpGetWithBody(url); + if (content != null) { + get.setEntity(new StringEntity(content, APPLICATION_JSON)); + } + base = get; break; case PUT: @@ -280,6 +284,29 @@ public class RestUtil { } } + class HttpGetWithBody extends HttpEntityEnclosingRequestBase { + public static final String METHOD_NAME = "GET"; + + public HttpGetWithBody() { + super(); + } + + public HttpGetWithBody(final String uri) { + super(); + setURI(URI.create(uri)); + } + + public HttpGetWithBody(final URI uri) { + super(); + setURI(uri); + } + + @Override + public String getMethod() { + return METHOD_NAME; + } + } + public HttpClient getHttpsClient() { |