开发者

web service in objective c [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. 开发者_运维技巧

Can we write a web service in objective c.Please help me out , i m in confusion


Yes we can! You can just use printf and CGI to do this. (Like you'd do with Python, Ruby, Perl, PHP, Shell Script, Malbolge, etc…).

Example:

#include <stdio.h>

int main() {
  printf("Content-Type: text/html\n\r");
  printf("\n\r");
  printf("<h1>Hello, world!</h1>");
  return 0;
}

Compile using this:

$ clang *.m -isysroot /Developer/SDKs/MacOSX10.7.sdk
$ mv a.out index.cgi

See the documentation of your web server for information on how to enable CGI.


Or you can do it the die-hard way by writing a server in Objective-C. It's not very difficult.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜