create doget and dopost method.