HTTP QUERY 메서드

HTTP QUERY method

요청 본문에 복잡한 조회 조건을 담으면서 안전하고 멱등적인 조회 의미를 밝힙니다.

···
html
<div class="n-demo"><div class="n-head"><strong>QUERY · SAFE RETRY</strong><span>LIVE TRACE</span></div><div class="n-stage"><div class="query"><div class="n-box mono">QUERY /search<br>{ filter: … }</div><div class="query-steps"><div id="qy0">send body</div><div id="qy1">connection lost</div><div id="qy2">retry same query</div><div id="qy3">same result</div></div></div></div><div class="n-foot">tap to step · auto replay</div></div>
css
.n-demo{width:min(94vw,760px);height:min(88vh,324px);padding:clamp(9px,2.2vmin,18px);border:1px solid var(--line);border-radius:13px;background:var(--surface);display:flex;flex-direction:column;gap:clamp(5px,1.3vmin,10px);font:600 clamp(12px,2.4vmin,16px)/1.3 "Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif;overflow:hidden}.n-head,.n-foot{display:flex;justify-content:space-between;align-items:center;color:var(--muted)}.n-head strong{color:var(--accent)}.n-head span,.n-foot{font-size:12px}.n-stage{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center;gap:clamp(4px,1vmin,10px)}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.n-box{padding:clamp(5px,1.5vmin,11px);border:1px solid var(--line);border-radius:8px;background:var(--bg);text-align:center}.n-on{border-color:var(--accent)!important;color:var(--accent)!important;background:color-mix(in srgb,var(--accent) 12%,var(--surface))!important}.n-muted{color:var(--muted)}@media(max-width:400px){.n-head span{display:none}}.query{width:94%;display:flex;align-items:center;gap:12px}.query>.n-box{width:43%;text-align:left}.query-steps{width:55%;display:grid;gap:4px}.query-steps div{padding:4px 7px;border-left:3px solid var(--line);color:var(--muted)}.query-steps .n-on{border-left-color:var(--accent)}
js
let step=1;function advance(){for(let i=0;i<4;i++)document.getElementById('qy'+i).classList.toggle('n-on',i===step);step=(step+1)%4}
const clickTarget=document.querySelector('.n-demo');if(clickTarget&&typeof advance==='function'){advance();const timer=setInterval(advance,1050);clickTarget.addEventListener('pointerdown',()=>{clearInterval(timer);advance()})}

2026년 RFC 10008은 본문을 받는 안전하고 멱등적인 HTTP QUERY 메서드를 정의합니다. 긴 조건을 URI에 밀어 넣거나 조회를 POST로 표현하던 경우에 의미를 더 정확히 전달할 수 있습니다.

데모는 QUERY 본문을 서버에 보내고 연결 실패 뒤 같은 조회를 재시도해 같은 결과를 받는 흐름입니다. 새 메서드이므로 서버와 중간 장비의 지원 여부를 먼저 확인해야 합니다.

언제 쓰나

복잡한 필터를 본문으로 보내면서 조회의 재시도 가능성을 명확히 해야 할 때 검토합니다.

페이지로 열기 ↗