티스토리 뷰
출처: https://stackoverflow.com/questions/3620558/process-raw-http-request
HTTP 은 텍스트 기반의 프로토콜이고, 해당 텍스트로 실제 요청을 하는 방법입니다.
raw.http 의 내용이 다음과 같을 때
GET /foo/bar HTTP/1.1
Host: example.org
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept: */*
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://example.org/test
Cookie: foo=bar; lorem=ipsum;
HTTP 요청 방법 1. nc 를 이용
$ nc example.org 80 < raw.http
# 또는
$ cat raw.http | someprogram | nc example.org 80
HTTP 요청 방법 2. curl 을 이용
$ cat raw.http | curl "telnet://TARGETHOST:80"
HTTPS 요청 방법. openssl 을 이용
$ cat raw.http | openssl s_client -connect server:443
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 스프링인액션
- Git
- 윈도우즈
- Eclipse
- React
- Widget
- 빔
- intellij
- 자바
- 리액터
- unit test
- reactiveprogramming
- 커피스크립트
- VI
- dojo
- Java
- Configuration
- gvim
- maven
- JavaScript
- Coffeescript
- REACTOR
- 리액티브프로그래밍
- Commonjs
- Windows
- 자바스크립트
- console
- VIM
- Node.js
- tipoftheday
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함