making http method of http endpoint optional