How do I send XML data in a post request? -
i'm using python , socket library see i'm sending.
i know each line must end crlf. know length of body must sent in headers (with content-length).
what don't know, if must send body string ended crlf, or several strings, each ended crlf. and, in last case, must include crlf in length of body ?
the length of body should include characters, including cr , lf.
if you're sending xml, don't agree each line must end crlf. sending pretty printed xml unnecessary. (that's humans; machines involved in transaction.) i'd remove of , send 1 long string.
it's important encode if you're using http protocol.
i'd wonder why if you're using raw sockets instead of http. xml on http understood.
Comments
Post a Comment