Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

283
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda