parameter test 추가

This commit is contained in:
pksup
2025-12-30 13:59:29 +09:00
parent 2b848d284d
commit 63281cbac3
@@ -54,14 +54,16 @@ class OAuth2BearerAuthTest {
} }
// Step 2: Bearer 토큰으로 인증 API 호출 // Step 2: Bearer 토큰으로 인증 API 호출
String apiUrl = TestConfig.getBaseUrl("/api/auth/case009?transactionId=1234567890"); String apiUrl = TestConfig.getBaseUrl("/api/auth/case009?transactionId=1234567890&parameterTest1=parameterTestValue1&parameterTest2=parameterTestValue2");
try (CloseableHttpClient httpClient = HttpClients.createDefault()) { try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpPost httpPost = new HttpPost(apiUrl); HttpPost httpPost = new HttpPost(apiUrl);
httpPost.setHeader("Authorization", "Bearer " + accessToken); httpPost.setHeader("Authorization", "Bearer " + accessToken);
httpPost.setHeader("Content-Type", "application/json"); httpPost.setHeader("Content-Type", "application/json");
httpPost.setEntity(new StringEntity("{}", ContentType.APPLICATION_JSON)); httpPost.setEntity(new StringEntity("{}", ContentType.APPLICATION_JSON));
String responseBody = httpClient.execute(httpPost, response -> { String responseBody = httpClient.execute(httpPost, response -> {
String body = EntityUtils.toString(response.getEntity()); String body = EntityUtils.toString(response.getEntity());
System.out.println("Response Body: " + body); System.out.println("Response Body: " + body);