且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用REBOL发送带有自定义标头的HTTP帖子

更新时间:2022-04-02 05:45:03

我已经弄明白了。您只需将标题和块(不是对象)添加到读取/自定义块。因此......

I've figured it out. You just add 'header and a block (not an object) to the read/custom block. Thus...

http-custom-header: [
    Content-Type: text/xml
    etc...
]

xml-request: {
    <?xml version="1.0" encoding="utf-8"?>
    <etc>etc...<etc>
}

site-URL: http://etc...

response: read/custom site-URL reduce [
    'header http-custom-header
    'post xml-request
]