시리즈 상세 - 번역 데이터 조회 기능 추가
This commit is contained in:
@@ -6,6 +6,7 @@ import org.springframework.http.HttpHeaders
|
||||
import org.springframework.http.MediaType
|
||||
import org.springframework.stereotype.Service
|
||||
import org.springframework.web.client.RestTemplate
|
||||
import org.springframework.web.client.postForEntity
|
||||
|
||||
@Service
|
||||
class PapagoTranslationService(
|
||||
@@ -46,10 +47,9 @@ class PapagoTranslationService(
|
||||
|
||||
val requestEntity = HttpEntity(body, headers)
|
||||
|
||||
val response = restTemplate.postForEntity(
|
||||
val response = restTemplate.postForEntity<PapagoTranslationResponse>(
|
||||
papagoTranslateUrl,
|
||||
requestEntity,
|
||||
PapagoTranslationResponse::class.java
|
||||
requestEntity
|
||||
)
|
||||
|
||||
if (!response.statusCode.is2xxSuccessful) {
|
||||
|
||||
Reference in New Issue
Block a user