rework get/post methods, support more edge cases