Solution 1: You can use callback function as parameter here, just pass callback function to getSrc() Method and call getSrc() function using the same callback function.
Solution 2: Another solution is you can take advantage of async/await feature of ES 7(ES 2016) just make this function async and put await keyword just before calling your axios.METHOD.