사용자 도구

사이트 도구


intellij_idea:dot_http

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판 양쪽 다음 판
intellij_idea:dot_http [2022/05/19 15:12]
kwon37xi [Profile 지정]
intellij_idea:dot_http [2022/05/19 15:16]
kwon37xi [결과 재사용 / 저장]
줄 66: 줄 66:
 ===== 결과 재사용 / 저장 ===== ===== 결과 재사용 / 저장 =====
   * HTTP Client 실행 결과를 저장하고 재사용할 수 있다.   * HTTP Client 실행 결과를 저장하고 재사용할 수 있다.
-  * [[https://www.jetbrains.com/help/idea/http-response-handling-api-reference.html|HTTP Response handling API reference | IntelliJ IDEA]] 참조+  * [[https://www.jetbrains.com/help/idea/http-response-handling-examples.html|Response handling examples | IntelliJ IDEA]] 참조
  
 <code> <code>
줄 76: 줄 76:
 } }
  
-//Saving a variable+// "auth_token"이라는 변수로 값을 저장.
 > {% > {%
     client.global.set("auth_token", response.body.json.token);     client.global.set("auth_token", response.body.json.token);
 %} %}
 </code> </code>
 +저장된 값을 사용하려면, 
 +<code> 
 +GET https://httpbin.org/headers 
 +Authorization: Bearer {{auth_token}} 
 +</code> 
 +  * 
 ===== Spring Web MVC Controller 실행 ===== ===== Spring Web MVC Controller 실행 =====
   * [[springframework:springboot:actuator|Spring Boot Actuator]] 를 추가한 상태에서 애플리케이션을 실행하고 나면,   * [[springframework:springboot:actuator|Spring Boot Actuator]] 를 추가한 상태에서 애플리케이션을 실행하고 나면,
   * 컨트롤러 메소드의 컨텍스트 메뉴에 **Run HTTP Request** 가 생겨서 요청을 테스트해 볼 수 있게 된다.   * 컨트롤러 메소드의 컨텍스트 메뉴에 **Run HTTP Request** 가 생겨서 요청을 테스트해 볼 수 있게 된다.
  
intellij_idea/dot_http.txt · 마지막으로 수정됨: 2023/03/10 10:19 저자 kwon37xi