ysk(0soo)
Lifealong
ysk(0soo)
전체 방문자
오늘
어제
  • 분류 전체보기 (238)
    • Java (50)
      • whiteship-java-study (11)
      • Java (28)
      • time (6)
    • Spring (68)
      • JPA (15)
      • Spring (1)
      • SpringBoot (1)
      • SpringMVC (6)
      • Spring Security (22)
      • Jdbc (1)
      • RestDocs (14)
      • log (6)
    • Kotlin (3)
    • Web (2)
      • nginx (1)
    • Database (14)
      • MySQL (5)
      • PostgreSQL (1)
      • SQL (1)
      • Redis (4)
    • C, C++ (0)
    • Git (1)
    • Docker (2)
    • Cloud (3)
      • AWS (3)
    • 도서, 강의 (0)
      • t5 (0)
    • 기타 (7)
      • 프로그래밍 (1)
    • 끄적끄적 (0)
    • CS (14)
      • 운영체제(OS) (2)
      • 자료구조(Data Structure) (9)
    • 하루한개 (12)
      • 우아한 테크코스-10분테코톡 (12)
    • 스터디 (12)
      • 클린 아키텍처- 로버트마틴 (2)
      • JPA 프로그래밍 스터디 (10)
    • 테스트 (34)
      • JUnit (19)
      • nGrinder (2)
      • JMeter (0)
    • Infra (3)
    • 프로그래머스 백엔드 데브코스 3기 (0)
    • 디자인 패턴 (3)
    • Issue (4)
    • system (1)
      • grafana (0)
      • Prometheus (0)

블로그 메뉴

  • 홈
  • 태그
  • 방명록
  • github

공지사항

인기 글

태그

  • 가상 스레드 예외 핸들링
  • nginx basic auth
  • querydsl
  • 트랜잭션
  • 인가(Authorization) 처리
  • 동일성
  • scope value
  • StructuredConcorrency
  • jpa
  • LocalDateTime
  • restdocs custom
  • VirtualThread Springboot
  • 동시성 제어
  • AccessDecisionVoter 커스텀
  • restdocs enum
  • tree
  • 가상 스레드
  • junit5
  • DataJpaTest
  • FilterSecurityInterceptor
  • AuthenticationException
  • 구조화된 동시성
  • UserDetailsService
  • AccessDecisionManager
  • mysql
  • node exporter basic auth
  • java
  • nGrinder
  • 동등성
  • 정규표현식

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
ysk(0soo)

Lifealong

Spring/RestDocs

Restdocs header 설정

2023. 1. 31. 00:47

HTTP Headers

요청 및 응답 헤더에 대한 세팅을 할 수 있다. 각각 request-headers.adoc 과 response-headers.adoc 파일이 생성된다.

Docs Reference

this.mockMvc
  .perform(get("/people").header("Authorization", "Basic dXNlcjpzZWNyZXQ=")) 
  .andExpect(status().isOk())
  .andDo(document("headers",
      requestHeaders( 
          headerWithName("Authorization").description(
              "Basic auth credentials")), 
      responseHeaders( 
          headerWithName("X-RateLimit-Limit").description(
              "The total number of requests permitted per period"),
          headerWithName("X-RateLimit-Remaining").description(
              "Remaining requests permitted in current period"),
          headerWithName("X-RateLimit-Reset").description(
              "Time at which the rate limit period will reset"))));
저작자표시 비영리 (새창열림)

'Spring > RestDocs' 카테고리의 다른 글

RestDocs - Custom Error Code Enum 문서화  (0) 2023.03.20
Restdocs fieldWithPath depth(list, array, 배열 문서화)  (0) 2023.01.31
REST Docs에 DTO Bean Validation 담기  (0) 2023.01.29
Restdocs pretty print, header 제거  (0) 2023.01.29
RestDocs Custom - 문서 커스텀  (1) 2023.01.29
    'Spring/RestDocs' 카테고리의 다른 글
    • RestDocs - Custom Error Code Enum 문서화
    • Restdocs fieldWithPath depth(list, array, 배열 문서화)
    • REST Docs에 DTO Bean Validation 담기
    • Restdocs pretty print, header 제거
    ysk(0soo)
    ysk(0soo)
    백엔드 개발을 좋아합니다. java kotlin spring, infra 에 관심이 많습니다. email : kim206gh@naver.com github : https://github.com/devysk

    티스토리툴바