refactor
add protocol selecion on api request