For a test case, I want to log the full request and/or response header of a testcafe test with the RequestLogger.
Is this possible? By default, only some basic information is logged.
Thanks
Make sure to enable the necessary options that are disabled by default when you create a request logger:
If any information is missing, specify what it is and why you need it.
Related
We would like to use PUT, PATCH and DELETE methods when building our internal API in Domino, but I can't configure those methods. Server refusing to pass them.
When I used method PUT Domino replied to me:
Error code: 405 | Request method is not allowed by the server
After that I enabled methods via notes.ini
HTTPEnableMethods=GET,POST,PUT,DELETE,HEAD,PATCH
That seems to help a bit but now it says something about URL, but I do not really get what it means.
Error code: 405 | The HTTP method is not allowed for the specified URL
I have made tests on two different setups: with and without internet sites documents enabled in server documents.
Does anybody what I need to do to solve the problem above?
UPDATE
I just noticed a help text on Internet Site for "Methods" field.
GET, HEAD, and POST are the most commonly used methods. OPTIONS and TRACE are useful for debugging. PUT and DELETE should only be enabled if the Web site includes special CGI programs or Java applications that implement them.
Based on that it seems it is not possible to make PUT and DELETE work out of the box.
When /Saml2/Acs from the middleware redirects to ExternalLoginCallback I'm getting an error=access_denied as part of the url. From searches I've done, I need to enable logging and I'll be able to find the reason. The problem is I cannot figure out how to enable logging to a file so that I'm able to read it.
The Troubleshooting page says to connect an ILoggerAdapater to my SPOptions.Logger, but that if I'm using OWIN middleware it is done automatically and I can see the output in the OWIN/Katana logging - Is this log in a file somewhere/can I make it show up in a file so that I'm able to see it?
The Owin Middleware by defaults wires up a ILoggerAdapter that writes to the Owin/Katana logging system. To get that output to a file, you need to configure Katana logging. There's an SO post describing what to do: How do I use Owin Katana Logger
Another option is to replace the existing ILoggerAdapter with your own write-to-file logic.
Specifically I want to add a client-set request ID to troubleshoot some network problems. I see that requireJS allows for control over query string parameters, e.g. for cache busting, but putting a unique request ID in the URL will cache bust (when I don't want to) and make debugging hard (breakpoints will be set on e.g. /resource?request_id=288832uc8vasd8).
RequireJS is going to pull scripts in by adding them as <script/> tags and then waiting for the callback to fire. As far as I know, you can't add headers to the request the the <script/> tag fires so I don't think you can add headers for RequireJS calls.
From there, you can consider the answer to is it possible to set custom headers on js requests?:
Short answer: no. By default a script tag will just retrieve the
resource specified in the src attribute.
I'm using Hapi.js's Good and GoodFile for access logs by logging 'response' events. How can I customize the object that gets logged? Specifically, I do not want to include the 'query' property on response events when the 'statusCode' is a 404.
good-file is not configurable in that fashion. It logs the JSON representation of the complete request. At present, if you want to control how the output is formatted, you will have to write your own custom reporter. Documentation can be found here.
You may also be able to fork good-file and just make some changes to the way the output is formatted.
I cannot seem to debug a restlet. I keep getting the error:
INVALID_HOST
Invalid host debugger.netsuite.com. Please send RESTlet requests to https://rest.netsuite.com/.
Even though my deployment list the external URL as:
https://debugger.netsuite.com/app/site/hosting/restlet.nl?script=58&deploy=1 and its status is "Testing"
I log into debugger.netsuite.com, click to use an existing script and it provides me with a cookie. I add this cookie to my HTTP request header and am still returned the above error.
The request header I'm sending is:
Cookie: NS_VER=2012.1.0; JSESSIONID=$session_id
Content-Type: application/json
Authorization: NLAuth nlauth_account=$account_id,nlauth_email=$email,nlauth_signature=$password,nlauth_role=
Does anyone know why I can't connect to the debugger?
As mentioned above, having an "Authorization" header along with the Cookie will produce the error you see. Also, make sure of the following:
The RESTlet is deployed in "testing" mode
You are the owner of the RESTlet
Your Netsuite account is enabled for debugging. Not 100% sure on this, but I have two logins, and only one was able to successfully debug a RESTlet.
You may not need this any more but the NetSuite online Help has a page specifically addressing how to debug your RESTlet in the NetSuite Debugger. It describes the process as logging into the Debugger server, then clicking "Debug Existing", then letting your script run. This way, the debugger knows how to help you. Your way, you're trying to run the script through the debugger server but not giving it a chance to grab that script's execution and control it.
Hope this helps.
Look for Advanced Rest Client in the google webstore. The service is free and works very well when debugging Netsuite Restlet.
Your on the right track. You just have to remove your Authorization data as you are already using the Cookie from Debugger to authenticate.
This solution is already available as well in SuiteAnswers