fix for encoding in HTTP request