client:set_header
Name
client:set_header — Set an HTTP header
Synopsis
require('msys.http.client')
client:set_header(header);
Description
Set a client’s HTTP header. To set multiple headers, invoke this function multiple times. Calling this function with no arguments will clear the headers.
function httpclient_test_post(url, postdata) client:set_header("Content-Type: text/xml; charset=utf-8"); client:do_request("POST", url, postdata); end
See Also
msys.http.client.new, client:set_timeout, client:do_request, client:get_status, client:get_body, client:parse_headers client:get_headers