add sync/async xhr option, v1.2.1