score:1
it seems that needs client request headers:
first = async () => {
const data = {
firstname:'abcdef',lastname:'defghi'
};
const resp = await axios({
method:'post',
url: 'url here' ,
data: data,
headers: {
'allow-control-allow-origin': 'domain permitted here',
'authorization': 'authorization here'
//eg: 'aurhorization': 'basic: ' + window.btoa(generatedcredentials);
}
}
);
console.log(resp);
Source: stackoverflow.com
Related Query
- React + ASP.Net Core 3: CORS Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header
- React Express Fetch Post CORS error: Response to preflight request doesn't pass access control check: It does not have HTTP ok status
- CORS issue - Response to preflight request doesn't pass access control check:
- Fetch in ReactJS with Basic Auth return 401 (Unauthorized). Preflight request doesn't pass access control check
- CORS issue in codeigniter 4: Response to preflight request doesn't pass access control check
- How to fix "Response to preflight request doesn't pass access control check: It does not have HTTP ok status" error in react app with nodejs api
- Preflight request doesn't pass access control check: It does not have HTTP ok status
- API GATEWAY - Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' when calling api from local host
- response to preflight request doesn't pass access control check: No 'Access-control-Allow-Origin' header is present in the requested resource
- Preflight Request doesn't pass access control
- tried to access the data via axios but Response to preflight request doesn't pass access control check
- Response to preflight request doesn't pass access control check: It does not have HTTP ok status - React issue
- How to fix CORS error: request doesn't pass access control check?
- How to call a react hook fetch request in a functional component to access data then pass to a class component to map?
- Preflight Doesn't Pass Control Check Access-Control-Allow-Origin Not Present
- Access Control Origin Header error using Axios
- how to pass object as params in Router.push() in nextjs and access that object in other component
- Redirect is not allowed for a preflight request
- Request header field … is not allowed by Access-Control-Allow-Headers in preflight response
- Firebase - Request header field x-firebase-gmpid is not allowed by Access-Control-Allow-Headers in preflight response
- How to access values from React Select and pass them to Formik values on Submit?
- Pass payload in GET request React fetch
- Pass values as parameters state from the component or access the status in the action creator?
- Request header field <field-name> is not allowed by Access-Control-Allow-Headers in preflight response
- How to pass Request cookies through node-fetch in isomorphic app?
- React router v6 access route params and pass as props
- React how can you pass a variable to a get request
- Can't access params sent in POST request from React client to Rails api
- How do I pass a custom parameter to nextjs dynamic route so I can access it inside getInitialProps
- NodeJS + ExpressJS: Request header field not allowed by Access-Control-Allow-Headers in preflight response
More Query from same tag
- using multiple redux stores one for each app user
- Slice vs filter in redux delete action
- Using react refs and forms
- How pass props?
- Redux doesn't set the initialState. Action dispatch fails too
- ReactJS: Parsing error: Unexpected token, expected "}"
- How to solve "termsOfUse must be a boolean type, but the final value was: "on"." using Ionic, React, Yup and Resolvers
- Delete image Doc from firebase firestore
- React router nested not working
- Material UI Overriding styles with increased specificity
- How to wrap the initialisation of an array in its own useMemo() Hook?
- Reloading a page after an error, redux
- React set state inside FullCalendar's datesSet
- filtering array of objects in react not working
- react js blueprintjs Date Range Picker not work
- testing to check if a function calls another function if requirements are met
- Property 'create' does not exist on type
- Generate two or more items returned by function map in Javascript
- Remove all unused Dependencies from react project using single command
- ENUM translation in javascript
- Cannot read property setState of undefined
- search filter in js
- Difference b/w React Typescript , React JavaScript and React Native?
- How to use functions from another component in React Typescript
- How to add <Link> react-router per each Material-UI TableRow?
- Failed to load resource: net::ERR_CONNECTION_REFUSED socket.io
- How do you await multiple axios calls with pagination in React?
- How to find data in an array of arrays?
- Trying to use Redux for toggling a modal but it is not working as expected
- Do not mutate state directly. Use setState() react/no-direct-mutation-state