You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
whenever I try to append Authorization headers to the request it returns 400 Error .
I tried to print headers it returns Headers {} . But I can see in the network log Authorization Bearer is sent returning Bad Request 400 Error. Please suggest. I tried to use same request from postman with same authorization Header the request is successful.
Console Log:
Http Request returns 400 Error:
I tried to hardcode Authorization HEader still 400 Issue Persist.
Please note I am using rtk-query-codegen-openapi to call Bff and the class looks something like :
import { workspaceApi as api } from '../query/workspaceApi';
const injectedRtkApi = api.injectEndpoints({
endpoints: (build) => ({
getCandidates: build.query<GetCandidatesApiResponse, GetCandidatesApiArg>({
query: () => ({ url: `/api/testBooking/getCandidates` }),
}),
})
The text was updated successfully, but these errors were encountered:
Hello I am new to RTK Query I read several articles around how to use RTK Query to send Headers. I am trying to do something similar:
whenever I try to append Authorization headers to the request it returns 400 Error .
I tried to print headers it returns Headers {} . But I can see in the network log Authorization Bearer is sent returning Bad Request 400 Error. Please suggest. I tried to use same request from postman with same authorization Header the request is successful.
Console Log:
Http Request returns 400 Error:
I tried to hardcode Authorization HEader still 400 Issue Persist.
Please note I am using rtk-query-codegen-openapi to call Bff and the class looks something like :
The text was updated successfully, but these errors were encountered: