Class WebClient

java.lang.Object
io.github.enxign.shed.toolkit.WebClient

public final class WebClient extends Object
외부 API 통신.
Since:
2020-02-01
Version:
1.0
 수정일       수정자      수정내용
 ----------   ---------   -------------------------------
 2020-02-01   first       create
 
Author:
enxign
  • Constructor Details

    • WebClient

      public WebClient()
  • Method Details

    • sendGet

      public static int sendGet(String targetUrl, String access_token, StringBuilder response, boolean isbearer) throws Exception
      GET 요청을 보내는 메소드.
      Parameters:
      targetUrl - 요청할 URL
      access_token - 인증 토큰
      response - 응답 결과를 저장할 StringBuilder
      isbearer - Bearer 토큰 여부
      Returns:
      HTTP 응답 코드
      Throws:
      Exception - 예외 발생 시
    • sendPost

      public static int sendPost(String targetUrl, String urlParameters, StringBuilder response) throws Exception
      POST 요청을 보내는 메소드.
      Parameters:
      targetUrl - 요청할 URL
      urlParameters - 요청 파라미터
      response - 응답 결과를 저장할 StringBuilder
      Returns:
      HTTP 응답 코드
      Throws:
      Exception - 예외 발생 시