Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

280
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!