Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
RESTlet call is not respecting Content-Type in header
I have a RESTlet that I have written that I am trying to call using Token Based Authentication (TBA) and via client code where I am already authorized. Using TBA, I get my data back and I am able to JSON.parse my body and everything works fine. Using client code however, even after setting the content-type to application/json, I get an error stating that I should be returning TEXT (which is the default Content-Type) which is not what I am expecting. If I JSON.stringify my results when returning in the restlet, my client code works fine but in my TBA
0