Add "Prefer" http header in requests to enable session auth

Signed-off-by: walteryang <walteryang47@users.noreply.github.com>
Fix undefined exception while proccessing data

Signed-off-by: walteryang <walteryang47@users.noreply.github.com>