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

96
Views
Network Request fail on basic auth with fetch in react native

My code look like this

import base64 from "react-native-base64";

  fetch("https:apilink", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: "Basic " + base64.encode("xelsysadm:Secure99"),
      },
    })

but still I dont know why it showing network req fail It working fine on postamn . Is i am doing something worng. please guide me.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try to put

Authorization

into parentheses, like that :

import base64 from "react-native-base64";

  fetch("https:apilink", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": "Basic " + base64.encode("xelsysadm:Secure99"),
      },
    })

about 4 years ago · Juan Pablo Isaza 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!