사용자 도구

사이트 도구


intellij_idea:dot_http

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
intellij_idea:dot_http [2022/05/19 15:12]
kwon37xi [Profile 지정]
intellij_idea:dot_http [2023/03/10 10:19] (현재)
kwon37xi
줄 1: 줄 1:
 ====== IntelliJ IDEA .HTTP ====== ====== IntelliJ IDEA .HTTP ======
 +  * [[:intellij_idea|IntelliJ IDEA]] HTTP Client - [[mailto:marketplace@jetbrains.com|HTTP Client - IntelliJ IDEs Plugin]]
   * [[https://www.jetbrains.com/help/idea/testing-restful-web-services.html|Testing RESTful Web Services - Help | IntelliJ IDEA]]   * [[https://www.jetbrains.com/help/idea/testing-restful-web-services.html|Testing RESTful Web Services - Help | IntelliJ IDEA]]
   * [[https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html|HTTP Client in IntelliJ IDEA Code Editor - Help | IntelliJ IDEA]]   * [[https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html|HTTP Client in IntelliJ IDEA Code Editor - Help | IntelliJ IDEA]]
줄 5: 줄 6:
   * ''프로젝트폴더/.idea/httpRequests/'' 에 로그 남음   * ''프로젝트폴더/.idea/httpRequests/'' 에 로그 남음
   * **Tools -> HTTP Client -> Test RESTFul Web Service** Rest Client 를 사용하여 테스트하는 것도 가능   * **Tools -> HTTP Client -> Test RESTFul Web Service** Rest Client 를 사용하여 테스트하는 것도 가능
 +  * [[https://blog.jetbrains.com/idea/2022/12/http-client-cli-run-requests-and-tests-on-ci/|명령행 http-client cli]]
  
 ===== Profile 지정 ===== ===== Profile 지정 =====
줄 66: 줄 68:
 ===== 결과 재사용 / 저장 ===== ===== 결과 재사용 / 저장 =====
   * 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: 줄 78:
 } }
  
-//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.1652940768.txt.gz · 마지막으로 수정됨: 2022/05/19 15:12 저자 kwon37xi