Make setting default Content-Encoding conditional

If there is no data to be POSTed or no query, then there need not be an encoding. If there is data/a query, its default encoding is set to `application/x-www-form-urlencoded` unless an encoding was specified by the caller already.