Use url-insert instead of just inserting data

url-insert checks the mime-type and encodes the buffer accordingly. We
no longer have the header in the buffer though. Use the url-http-*
variables instead.