Write and Read Http - qtxie/red GitHub Wiki

write | read url [
    Http-Verbs      (word!)
    Http-Headers    (block! Must be set-word!, string! pair. Optional when use GET or HEAD method)
    Data            (string! binary! Optional when use GET or HEAD method)
]

probe write/info http://httpbin.org/put [
    PUT
    [Content-Type: "Content-Type: text/html; charset=utf-8"]
    "Hello Red"
]

probe write/info http://httpbin.org/put [HEAD]

read http://httpbin.org/get [                           ;-- GET request with custom headers
	GET
	headers [
		Content-type: "text/x-x"
		Header-Test: "abc"
	]
]