Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

344
Vistas
Reference Error: client is not defined

I am Creating REST API Call in jira using below code :-

var loginArgs = {

data: {
    "username": "singhharwinder@seasiainfotech.com",
    "password": "Seasia@123"
},
headers: {
    "Content-Type": "application/json"
}

};

client.post("http://jira.atlassian.com/rest/auth/1/session",

loginArgs,function (data, response) {

if (response.statusCode == 200) {
    console.log('succesfully logged in, session:', data.session);

    var session = data.session;
    var searchArgs = {
        headers: {
            cookie: session.name + '=' + session.value,
            "Content-Type": "application/json"
        },
        data: {
            jql: "type=Bug AND status=Closed"
        }
    };

    client.post("http://jira.atlassian.com/rest/api/2/search", searchArgs, function (searchResult, response) {
        console.log('status code:', response.statusCode);
        console.log('search result:', searchResult);
    });
} else {
    throw "Login failed :(";
}

});

It is giving me "Reference Error: client is not defined". Please help me .

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda