When url is invalid, NewRequest may nil request with an error. It can occurs nil-pointer dereference on setting HTTP header.