Added changes for post and patch methods.