本文主要假定为 XML 请求和响应主体;但是在末尾的一个小节中,也介绍了如何处理 JSON 请求和响应。
The majority of this article will assume XML request and response bodies; however, there's also a section at the end that covers how to handle JSON requests and responses.
PUT命令会发回输出缓冲区的内容,但是main末尾的返回语句也会将数据发送回去;所生成的状态会发回给PPE。
The put command sends back the contents of the output buffer, but the return statement at the end of main also sends back data; the status generated will be passed back to the PPE.
我使用“ _ E OF _ ” (EOF表示文件的末尾),是因为,这是一个传统的表示形式,但是,你可以使用任何字符穿,只要你所用的字符串不跟bash的保留字相冲突就可以了。
I use "_eof_" (EOF is short for "End Of File") because it is traditional, but you can use anything, as long as it does not conflict with a bash reserved word.
应用推荐