NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
101 stars 50 forks source link

Can't read headers anymore #143

Closed Burgov closed 6 years ago

Burgov commented 6 years ago

Before, I was able to read the response headers:

            task.on('complete', (result: any) => {
                let headers = new HttpHeaders();

                const iterator = result.response.getHeaders().entrySet().iterator();
                while (iterator.hasNext()) {
                    const header = iterator.next();
                    headers = headers.append(header.getKey, header.getValue());
                }

                // ...

            });           

However, that doesn't work anymore since https://github.com/NativeScript/nativescript-background-http/pull/134, because the response object is no longer exposes (not on 'completed', not on 'responded')

zbranzov commented 6 years ago

A fix has been released in the latest 3.2.7 version of the plugin.