Is it possible somehow call async Ionic Storage synchronously?
<p>I'm trying to create a class for working with API on top of <code>Angular2 HTTP</code> class. The main thing is that I need to add custom auth header which is available after user authorized. </p>

<p>The main problem is that the token is stored in Ionic Storage module from which it can be only be obtained asynchronously, but I need to return the specific type....</p>

<pre><code>export class APIRequest extends Http {

    private storage : Storage;

    constructor (backend: XHRBackend, options: RequestOptions) {
        super(backend, options);

        this.storage = new Storage;
    }

    request(url: string|Request, options?: RequestOptionsArgs): Observable&lt;Response&gt; {
        if (typeof url === 'string') {
            url = AppConfig.API_SERVER + url
        } else {
            url.url = AppConfig.API_SERVER + url.url
        }

        this.storage.get('authToken').then(token =&gt; {
            if (typeof url === 'string') {
                if (!options) {
                    options = {headers: new Headers()};
                }

                options.headers.set('Authorization', `Bearer ${token}`);
            } else {
                url.headers.set('Authorization', `Bearer ${token}`);
            }
            // Here I need to return 
        }, err =&gt; {
            // throw some error
        })

        return super.request(url, options).catch(this.catchAuthError(this));
    }
}
</code></pre>

<p>So basically I need somehow to put <code>return super.request(url, options)...</code> to the promise of the storage and return when i get that token.</p>