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.
RESTlets: Can I read from the header?
Hi,
I'm creating a RESTlet that expects a customer's email address so that it can do a search & find custom records associated with that customer. Currently I'm using the following Java code to connect to the RESTlet with a customer center role:
import java.util.*; import java.io.*; import java.net.*; public class CallRESTlet { /** * @param args */ public static void main(String[] args) { try { URL url = new URL("https://rest.sandbox.netsuite.com/app/site/hosting/restlet.nl?script=44&deploy=1&custparam_email=abcd@myjob.comcustparam_email=abcd@myjob.com"); HttpURLConnection httpConn = (HttpURLConnection)url.openConnection(); httpConn.setRequestMethod("GET"); httpConn.setRequestProperty("Authorization", "NLAuth nlauth_account=######,
0