I use MapBox REST API on backend side to create a route. Here is a simplified code:
public class MapBoxRequest { /