Does anyone know why in Postman I call my restlet ...
# suitescript
p
Does anyone know why in Postman I call my restlet and get a 200 OK w/no results but in my browser I get results?
e
You need to include the Content-Type: application/json in your header
s
Also, ensure your token is for the same user as your browser session if you expect consistent results between the two.
FWIW, we use Playwright for our restlet testing.
p
Thanks, I had the content type set and still no results in Postman or my C# app. I am also using the same user between the two as far as I can tell.
message has been deleted
b
make extra sure it the same role and user
else i give the opposite advice of @Eric B, your browser isnt asking for json in the request it send
you should be using plain text as the content type instead, not that i think it actually matters in this case
p
Yeah @battk I tried that as well. My restlet runs a saved search and then I format that to JSON response that I write out. Any ideas on what might be permissions on the restlet or the saved search causing it be blank when I use the credentials in my Postman project? At first I was getting unauthorized I got beyond that by adding my user to the restlet, to get a 200 OK, but its just blank.
I messed with the restlet and it can certainly send output to postman. It's something to do with the search. It appears the role isn't able to get results from the search. The record count is always 0. Is there anything in the saved search or the role I should be looking at that might missing permissions?
I got it! Thank you all. I found a permission on the role needed to bring the data back that was in the search. Trial and error.
👍 1