結果 : how to send an api request in javascript