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

133
Vistas
How to pass url dynamically to rest api?

I need to pass the get api urls for fetch the data from one application to another application. I have temporary solution as the url details in queryParams and use it in another application. Is there any professional way to implement for build url with dynamically?

In my first application i have build the url as below

async buildUrl(applicationId, getUrl) {
        let url = this.filterBaseurl + `datafilter/get-filter-utility?entityId=${applicationId}&connectorName=${this.connectorName}&entityName=${this.entityName}&getUrl=${getUrl}`
        return url
    }

example result of above function is

${baseUrl}/datafilter/get-filter-utility?entityId=12345678&connectorName=greenhouse&entityName=engagement-request&getUrl=jobs

in my another application i have calling the required api url

let queryparams = req.queryParams
let url = ${queryparams.getUrl}/{queryparams.entityId}
let response = await this.restProvider.get(url)

the way i have implement with queryParams is unprofessional, is there any better way to build the api url dynamically. one difficulty is i shouldn't call second application's api endpoint from first application.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Something like this?

var x1 = new URL("https://example.org")
x1.searchParams.append("x", "y")
about 4 years ago · Juan Pablo Isaza Denunciar
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