encode body parameters
return error as a NSMutableDictionary object