ASIHTTPRequest를 사용하고 있으며 일부 값을 서버에 보내려면 POST 메서드를 사용해야합니다. 그래서,이 헤더와 해당 값을 설정해야합니다. 다음요청에 헤더를 추가하는 ASIHTTPRequest
는ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request addRequestHeader:@"Referer" value:@"http://allseeing-i.com/"];
내 응용 프로그램에 포함시킬 필요가 헤더, 그리고 내가 어떻게 당신은 단지 추가 할 필요가 한때 세미 콜론 ("Content-Type" = "text/html";
, "Keep-Alive" = "timeout=15, max=100";
등)
"Content-Type" = "text/html";
Date = "Wed, 21 Jun 2011 09:09:57 GMT";
"Keep-Alive" = "timeout=15, max=100";
Server = Apache;
"Transfer-Encoding" = Identity;
좋아,하지만 큰 따옴표'' "'를 사용해야합니까? 예 :'Keep-Alive "="timeout = 15, max = 100 ";'<- 큰 따옴표를 보시길. – Illep
내 답변에 예제를 추가했습니다. – JosephH