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

63
Views
Facing issue with React Request while making a call to backend written in Java
const handleSubmit = async(e) => {
    const url ='https://3a66-103-59-74-38.in.ngrok.io' 
    const path='api/v1/purchase-order/save'
    const data = {
       
       billTo:billTo,
       shipTo:shipTo,
       supplyPlace:supplyPlace,
       pan:pan,
       gstin:gstIn,
       billNo: "",
       billDate:billDate.toString(),
       items:inputList
    } 
    const res = await fetch(`${url}/${path}`, {
      method: 'POST',
      //made :'cors',
      headers: {
        'Content-Type': 'application/json;charset=utf-8',
        'Access-Control-Allow-Origin':'*',
        'Access-Control-Allow-Headers':origin,
        'Access-Control-Allow-Credentials':true
      },
      body: JSON.stringify(data),
    })

This is the code that I have written in react to make a POST request to the backend written in Java . But ,My POSTMAN request gives 200 whereas it is coming 403 on backend . Also ,the method that shows there is not POST .It is 'OPTIONS' that shows at the backend console .

about 4 years ago · Santiago Gelvez
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!