fixed api console to handle methods get and post