build request/xhr into layer