blob: cbbd88defd4c0aa4f092c63c20f5d712dbff385f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package org.onap.nbi.apis.serviceinventory;
import java.util.LinkedHashMap;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Service
public class NbiClient extends BaseClient {
@Value("${nbi.url}")
private String nbiUrl;
public LinkedHashMap getServiceSpecification(String id) {
StringBuilder callURL = new StringBuilder().append(nbiUrl).append("/serviceSpecification/").append(id);
ResponseEntity<Object> response = callApiGet(callURL.toString(), new HttpHeaders());
return (LinkedHashMap) response.getBody();
}
}
|