added setEncoding to request