Expose type for URL

@qinweigong - plus I updated the android one per your suggestion