After POST/GET request I get such URL back which I need to parse, of course I can go and use spit() to get required information, but for sure should be more elegant way of doing that. Any ideas?
http://api.vkontakte.ru/blank.html#access_token=8860213c0a392ba0971fb35bdfb0z605d459a9dcf9d2208ab60e714c3367681c6d091aa12a3fdd31a4872&expires_in=86400&user_id=34558123
I am parsing for: access token
and expires_in
URL parsing is a function of traffic management and load-balancing products that scan URLs to determine how to forward traffic across different links or into different servers. A URL includes a protocol identifier (http, for Web traffic) and a resource name, such as www.microsoft.com.
Method 1: In this method, we will use createElement() method to create a HTML element, anchor tag and then use it for parsing the given URL. Method 2: In this method we will use URL() to create a new URL object and then use it for parsing the provided URL.
Using the URI class you can do this:
var url = new Uri("your url");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With