Skip to content

Consecutive call to apiCall does not reset paramAppender #14

@Softveras

Description

@Softveras

If in callback of the linkedin_client.apiCall we make another call to linkedin_client.apiCall
paramAppender does not reset which can cause problem for the next call.

Example:

linkedin_client.apiCall(
'GET'
,'/job-search?country-code=us&postal-code=90210&count=1'
, {token: myToken}
, searchCallback);

var searchCallback = function (error, response, body) {

if(error === null)
{


    var results = response.jobs.values;

    for(var i=0; i<jobs.length; i++)
    {
        linkedin_client.apiCall(
          'GET'
        ,'/jobs/' + jobs[i].id + 
        , {token: myToken}
        , anotherCallback);
    }
}

}

Solution:
add paramAppender = "?"; upon entering apiCall()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions