nativescript-community / https

Secure HTTP client with SSL pinning for Nativescript - iOS/Android
https://nativescript-community.github.io/https/
Other
50 stars 42 forks source link

Url issue #22

Open bigN13 opened 6 years ago

bigN13 commented 6 years ago

I am installing the addin with

tns plugin add nativescript-https

Next, I am adding the basic call:

import * as Https from 'nativescript-https'
Https.request({
    url: 'https://wegossipapp.com/api/newuser',
    method: 'GET',
    headers: {
        'Authorization': 'Basic ZWx1c3VhcmlvOnlsYWNsYXZl',
        'x-uuid': 'aHR0cHdhdGNoOmY',
        'x-version': '4.2.0',
        'x-env': 'DEVELOPMENT',
    },
}).then(function(response) {
    console.log('Https.request response', response)
}).catch(function(error) {
    console.error('Https.request error', error)
})

and, I am getting the url parameter doesn't exist in type "HttpsRequestOptions". After some investigation of the github code i can see that the https.common.d.ts file is not the same and its missing bunch of stuff like url param:

export interface HttpsRequestOptions extends HttpRequestOptions {
    method: 'GET' | 'POST';
    headers?: Headers;
    content?: string;
}

am i missing something?

EmandM commented 5 years ago

I am also hitting this issue. Any solutions?