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

282
Vistas
React Native: set headers with the Linking api

How can I setRequestHeader in React Native? Like the following:

var client = new XMLHttpRequest();
client.open("GET", "http://www.example.com/api");
client.setRequestHeader("authorization", "Bearer Access_Token");
client.send();

I can't find any info in the Linking api doc. https://facebook.github.io/react-native/docs/linking.html

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

to make request with headers to website, you need http(s) request, not linking between 2 apps.

As mentioned in other answer, linking api does not have headers. While fetching remote address with http(s) do have headers

https://facebook.github.io/react-native/docs/network.html

fetch('https://mywebsite.com/endpoint/', {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    firstParam: 'yourValue',
    secondParam: 'yourOtherValue',
  })
})
over 4 years ago · Santiago Trujillo Denunciar

0

The Linking API is for linking between apps on the device. There is no notion of headers when linking between apps. Use query parameters in the URL instead.

over 4 years ago · Santiago Trujillo 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