Backend code

Hi,
Just to confirm, if my backend includes the following code:
export function user(userId){
return fetch(${server}/user/${userId},
{
method: ‘GET’,
headers: headers
})
.then((httpResponse)=>{
if(httpResponse.ok){
return Promise.resolve(httpResponse.json());
}
return Promise.reject(“Fetch did not succeed :(”);
})
.catch(err => console.log(err));
}

Can the client see the headers of the request?

Do you mean if you can get the headers back to your client or if the client you are sending your GET to can get the headers?

I have credentials passed in the headers, and I don’t wish the client to be able to see it.
If this is on the backend, it shouldn’t, right?

They cant see that but consider using POST which is more secure.