devtools: Open response HTML in new tab - django

If an ajax/fetch request fails, my framework (django) displays a nice debug page, which contains a lot of useful information.
In chrome devtools I can see a preview of this debug page. But the window in the devtools is way too small.
Is there a way to open the output of the POST request in a new tab?
If I use right-button-click "open in new tab" then chrome does a GET. But the GET does not trigger the exception which I would like to debug.

I think the best you can do is recreate the scenario in Postman. Postman has a tool called interceptor which syncs cookies and captures requests from Chrome.
Postman interceptor uses a chrome extension which sends the captured requests to Postman app if you enable interceptor from the app.
But there could be security risk that the chrome extension will have Site access to all pages, maybe you can limit it by limiting the site access from extension settings(from settings>extensions>Postman interceptor):
Alternativly, if you do not want to use interceptor, then you can copy the payload(form data) and request headers from Headers section, then put them in Postman and make a request. Or you can use requests library to do the same.

How about using the full-screen mode of dev tools instead of opening in the separate browser tab?
Click on the three dots on the right-hand side of the chrome dev tools
Click on the first option (the two overlapping squares) and it would open the chrome dev tools in the full-screen mode.
Please refer to the image below.

Related

What part of the url i get while trying to open postman from browser link in your api site should i feed postman and where?

While trying to open the "open with postman" link on Imgur's api side https://apidocs.imgur.com/ a popup gives me an option to "open" with postman for linux
( I'm in archlinux 64 with postman installed in /usr/bin/)
But instead of open postman my browser PaleMoon open the address
postman://app/collections/import/1688173-9a20ba61-00a6-46ee-8aa2-2f195e325339-6YsWHMa?referrer=https%3A%2F%2Fapidocs.imgur.com%2F#?
in a new tab and tells me that it is confused and don't know what to do.
What part of that url should i feed postman manually and where/how?
I actually only want to get my hands on a client_id and client_secret for my phpBB extension imgur-upload.
I have tried to feed the whole string and also just the 1688173-9a20ba61-00a6-46ee-8aa2-2f195e325339-6YsWHMa part trough the import from link in postman, but it won't swallow it.
I have also tried to send it as a GET and POST but postman tels me that it can't get a response..
Imgur pointed here if there were problems or questions..
I'm probably just old and mushy brained as usual but i would die for some advice or pointers.
By the way.. Our forum is for a non for profit organization so we should be obliged to use the api if i have understood imgur's rules right. Darn hard way to get this id and secret thou..
I had the same problem on Ubuntu, and I followed the installation guide, created the Postman.desktop file and Firefox asked me to choose the application to open the postman:// url.
Alternatively you can import Imgur api directly from postman.
Click the + New button, then click the API Network tab and search for Imgur:

Opening a link from postman response in an external browser

I need to click a link in the postman response that loads an HTML page, then fill a form which makes an AJAX request followed by a redirect. Postman doesn't allow that, so I have to copy the link from the response and paste it in chrome which is a bit tedious and error-prone.
Is there a way to configure postman or use a key combination like (shift-click which doesn't work) to load the URL in an external browser?
Update: This feature now exists from Postman version 6.1.2
From version 6.1.2 Cmd/Ctrl + Click will open the link in default browser.
See link
They opened an issue a few months before you asked this question (link) and it is till now unresolved.
There isn't any configuration or key combination available either.
In the current online version you can right click in the response / preview pane and choose go to ... in the shortcut menu

Postman - How to see request with headers and body data with variables substituted

I am using the Postman Chrome plugin to invoke HTTP requests for software testing. I use the Environments feature with Environment and Global Variables to substitute variables in my requests headers and body.
The variable substitution is working correctly (I can tell as the responses from the HTTP Server indicate that).
However, I would like to be able to see the Request Header and Body values AFTER the variables have been substituted. How can I do that?
As of now, Postman comes with its own "Console." Click the terminal-like icon on the bottom left to open the console. Send a request, and you can inspect the request from within Postman's console.
Update 2018-12-12 - Chrome App v Chrome Plugin - Most recent updates at top
With the deprecation of the Postman Chrome App, assuming that you are now using the Postman Native App, the options are now:
Hover over variables with mouse
Generate "Code" button/link
Postman Console
See below for full details on each option.
Personally, I still go for 2) Generate "Code" button/link as it allows me to see the variables without actually having to send.
Demo Request
Demo Environment
1) Hover over variables with mouse
2) Generate "Code" button/link
3) Postman Console
Update: 2016-06-03
Whilst the method described above does work, in practice, I now normally use the "Generate Code" link on the Postman Request screen. The generated code, no matter what code language you choose, contains the substituted variables. Hitting the "Generate Code" link is just faster, additionally, you can see the substituted variables without actually making the request.
Original Answer below
To see the substituted variables in the Headers and Body, you need to use Chrome Developer tools. To enable Chrome Developer Tools from within Postman do the following, as per http://blog.getpostman.com/2015/06/13/debugging-postman-requests/.
I have copied the instructions from the link above in case the link gets broken in the future:
Type chrome://flags inside your Chrome URL window
Search for “packed” or try to find the “Enable debugging for packed apps”
Enable the setting
Restart Chrome
You can access the Developer Tools window by right clicking anywhere
inside Postman and selecting “inspect element”. You can also go to
chrome://inspect/#apps and then click “inspect” just below
requester.html under the Postman heading.
Once enabled, you can use the Network Tools tab for even more
information on your requests or the console while writing test
scripts. If something goes wrong with your test scripts, it’ll show up
here.
If, like me, you are still using the browser version (which will be deprecated soon), have you tried the "Code" button?
This should generate a snippet which contains the entire request Postman is firing. You can even choose the language for the snippet. I find it quite handy when I need to debug stuff.
Hope this helps.
I'd like to add complementary information:
In postman app you may use the "request" object to see your subsituted input data. (refer to https://www.getpostman.com/docs/postman/scripts/postman_sandbox in paragraph "Request/response related properties",
ie.
console.log("header : " + request.headers["Content-Type"]);
console.log("body : " + request.data);
console.log("url : " + request.url);
I didn't test for header substitution but it works for url and body.
Alex
You can easily check the content of requests and responses with help of the postman console.
Here is a nice short video explanation How to debug postman request explained.
You can see below the snippet of how the log will show data.
You can check above video for learning how to log custom information.
On web version, if you click code tab on the right, code snippet will appear with multiple language and format choices.
Even though they are separate windows but the request you send from Postman, it's details should be available in network tab of developer tools.
Just make sure you are not sending any other http traffic during that time, just for clarity.

Meteor Facebook Login "You are using a display type of 'popup' in a large browser window or tab" Error

I am using meteor accounts-ui/accounts-facebook to login and am getting the following error.
You are using a display type of 'popup' in a large browser window or tab. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment. Alternatively, set height and width on your window.open() call to properly size this dialog if you have special requirements precluding you from using the SDK. This message is only visible to developers of your
http://goo.gl/IBmdjI (screenshot)
I haven't been able to find any information on the fix anywhere. Is this something in meteor core that needs to be changed?
This isn't a issue really its just a warning. Meteor doesn't use the JS Facebook SDK and gives a specified height/width for the facebook OAuth dialog & your browser size may be too big for the small popup (not too sure- looks ok in your screenshot).
If you disable your app from Sandbox mode/another user uses your app they wouldn't see this warning anymore.
The alternative is to use a redirect to facebook or a mobile display. The best option is the popup (what you have now) because it's the fastest: A redirect means your Meteor app has to reconnect up.

capture https web page that user is viewing in his browser

I am developing a Desktop application that allows the user to capture the contents of a web page loaded in web-browser. I take the URL from the browser, then load the contents into my WebView and then create image out of it.
It works fine with http URLs. The problem comes when I have to capture https URL contents.
Suppose I have a login page with https URL displayed in the browser, I get this URL from the browser and try to load it in my web view. I get the following error :
"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “” which could put your confidential information at risk."
If user has logged in to a web page and viewing some contents in Safari browser. Now, if he wants to capture the entire web page, he comes back to my app.
But, my app is not able to capture these contents. The reason is that, once user logs into a site, cookies are written into his system and this is browser specific. Hence, my web view is not able to directly enter into the page that user is viewing in the browser.
Even though technically it sounds right, user will not accept this behavior in my app.
How do I solve this? Is there any alternative method to capture the entire web page that user is viewing in the browser?
Thanks and Regards,
Deepa
You could investigate making your application a browser plugin for those browsers on your target platform.