Added "encode" function which provides us with encoded string, without u...

...nneeded headers.

It should be useful for multipart encoding.