1 Reply Latest reply on Nov 30, 2017 10:20 AM by nmilleson RSS
    mmunuswamy Newbie

    PostJSON with user authentication

    I am looking for a sample code invoking PostJSON service with user authentication across session.

    i.e Once user is authenticated during first use(login) subsequent REST calls should use the current user(session user) &password.

    How do i pass the username & password to PostJSON, dynamically by taking it from the current session

    var params = {

    proxyScheme: undefined /* STRING */,

    headers: undefined /* JSON */,

    ignoreSSLErrors: undefined /* BOOLEAN */,

    useNTLM: undefined /* BOOLEAN */,

    workstation: undefined /* STRING */,

    useProxy: undefined /* BOOLEAN */,

    withCookies: undefined /* BOOLEAN */,

    proxyHost: undefined /* STRING */,

    url: undefined /* STRING */,

    content: undefined /* JSON */,

    timeout: undefined /* NUMBER */,

    proxyPort: undefined /* INTEGER */,

    password: sessionpassword?? /* STRING */,

    domain: undefined /* STRING */,

    username: sessionuser?? /* STRING */

    };