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

64
Vistas
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
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