Код: Выделить всё
GET /hello/{id}?idType={idType}
Мне нужно использовать эту службу, используя:
Код: Выделить всё
@HttpExchange("/hello")
public interface HelloClient {
@GetExchange("/{id}")
String hello(@PathVariable String id, @RequestParam IdType idType);
}
Код: Выделить всё
public enum IdType {
LOGIN_ID("loginId"),
CONTACT_ID("contactId");
String idType;
IdType(String idType) { this.idType = idType; }
}
Код: Выделить всё
GET /hello/xyz?idType=loginId
Код: Выделить всё
helloClient.hello("xyz", IdType.LOGIN_ID);
expected: GET /hello/xyz?idType=loginId
actual: GET /hello/xyz?idType=LOGIN_ID
Код: Выделить всё
helloClient.hello("xyz", IdType.LOGIN_ID.getIdType());
Подробнее здесь: https://stackoverflow.com/questions/792 ... pinterface
Мобильная версия