Postman Client: request body cannot be set (busy indicator shown) - postman

In the Postman Client I sometimes have the issue that I cannot enter a raw / JSON body value. The usual edit input field is not displayed, and instead an animated busy icon indicator is shown indefinitely.
Selecting a different body type (e.g. form-data) brings the expected input fields, but does not help me. Selecting a different content-type (from the dropdown, JSON in the screenshot) does not help.
Neither does selecting a different verb (PUT, POST, PATCH - even GET shows the same)
I've not found out for which requests this happens, but usually I'm working from a collection automatically generated from our UI documentation.
I'm pretty sure I've seen those working before, but when they don't work, re-opening them from the collection will not help, neither will restarting of Postman client.
I tried searching for this issue both on Postman help, here on StackOverflow, and Google, but didn't find the right search terms to bring up anything useful.
When checking the Postman version, I get this information:
You are up to date! Postman v8.7.0 is the latest version.

Related

View currently published page in Sharepoint

I am making edits to a client's Sharepoint site.
I checked out the page, made all the changes required, checked it back in, and am waiting on their go-ahead to publish.
I want to double-check that certain elements are the same as they were before I started editing. Generally I would go to site contents > pages > version history of the page I am working on, and look at the currently published version (because, as an editor, it seems to only show me the unpublished draft when I am on the page URL).
Tried to do that today and am getting an error: Sorry, something went wrong
Exception from HRESULT: 0x80131904.... Insightful and intuitive Microsoft error - well done guys (NOT).
Is there any other way that is more straightforward to just view what is currently published?
The quickest way to do this is to either log on as a test account that has only got read only permissions, or to ask one of your colleagues that doesn't have edit permissions to browse to the page and you can see what they see.
Version history, while is helpful when you need to roll back, won't show changes to web parts or other hidden elements when viewing it, so it's not always that helpful when using it for a case like yours.
As a side note, to log in as another user in SP2013, append this to your URL: http://yoursite/_layouts/15/closeconnection.aspx?loginasanotheruser=true

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.

Fetching stream (me/home) omits videos

I'm trying to get all of the videos of my stream.
When I go to http://developers.facebook.com/docs/reference/api/ and click on the news feed (me/home) link, using that access token, I see my entire stream, including videos.
However, when I fetch the stream (me/home) from my app, it shows me the entire stream except the ones with type:video. I also tried it in the graph explorer and I have the exact same problem there. In my app, I've tried enabling permissions including user_status, user_videos, user_photo_video_tags, friends_status, friends_videos, friends_photo_video_tags, read_stream, and offline_access. None of these help.
I even tried turning on every single permission and it doesn't help. (If I just want to get my own videos--me/posts--that works fine.)
I also tried FQL and, while I'm a beginner at that, it seems to have the same problem.
So, can others see videos in me/home? Am I missing something obvious? Or is it a facebook bug? (I couldn't find that in their bug DB).
Thank you.
Appears to be a bug. You should go there and mark that you can validate it. Also subscribe to the bug so you know when it get's fixed.
http://developers.facebook.com/bugs/231621496918030
Steps to Reproduce: 1. get an access token using the read_stream
permission
call me/home api
https://graph.facebook.com/me/home?format=json&limit=25&until=1326865528&access_token=AAAEVaIcG7E0BADwZCmtcqokmLMikQqAIcE5zaUgZCtXEVlOTRVma18db7M9WWr1EcjNZAAzVhAK7LgSrGjTOlGqF3SDrMSnk4BHP3ZBC5gZDZD
no data returned, but when I switched to the Graph API Explorer app in
the test tool with the same permission. it returns 25 entries.
Expected Behavior: all feed posts in the stream Actual Behavior: none
or a few entries

How can I get review-rank in the Amazon Product Advertising API?

Using the Amazon API it seems that it's not possible anymore to get the review rank information of a product. Checking this link the note says:
As of November 8, 2010, only the iframe URL is returned in the request
content.
However, testing with the params they suggest to get the Iframe, but it seems that now even the Iframe doesn't work anymore. Thus, even in the latest API Reference in the chapter "Motivating Customers to Buy" the part "reviews" is completely missing.
However: Since I'm also very interested if it's still possible somehow to get the review rank information - maybe even not using the Amazon API but a competitor's API to get review rank information - I hope someone can provide something helpful on this topic.
Preamble: I'm not sure that I understand exactly what you are looking for here but I'll share my findings anyways.
I was able to retrieve the iframe URL for the reviews and was able to see the reviews iframe after embedding it into an .html page. I used the following attributes to retrieve the iframe URL:
Operation=ItemLookup&
ItemId=1451648537&
ResponseGroup=Reviews&
TruncateReviewsAt="256"&
IncludeReviewsSummary="False"&
Version=2011-08-01 <= important: can't be less than this version
AssociateTag=<YourAssociateTag> <= required when using this version, can be anything (not verified by Amazon)
The relevant part of the response:
<Item>
<ASIN>1451648537</ASIN>
<CustomerReviews>
<IFrameURL>http://www.amazon.com/reviews/iframe?akid=<YourAmazonKey>&alinkCode=xm2&asin=1451648537&atag=<YourAssociateTag>&exp=2012-01-06T02%3A10%3A38Z&summary=0&truncate=256&v=2&sig=kjWPue1N75%2FiI1hW67XYApWxnKeT2tlT%2FJ1rw4WLlUo%3D</IFrameURL>
<HasReviews>true</HasReviews>
</CustomerReviews>
</Item>
Note that you will not be able to use this iframe URL due to the fact that (1) I've removed my Amazon Key and the Associate Tag that was used to create the signature and (2) it expires 24 hours after the call.
If you use the same attributes that I've used, paying close attention to the Version and AssociateTag fields, you will get a result with an iframe URL included.
I then embedded the url in an iframe:
<html>
<body>
<iframe src="http://www.amazon.com/reviews/iframe?akid=<YourAmazonKey>&alinkCode=xm2&asin=1451648537&atag=<YourAssociateTag>&exp=2012-01-06T02%3A10%3A38Z&summary=0&truncate=256&v=2&sig=kjWPue1N75%2FiI1hW67XYApWxnKeT2tlT%2FJ1rw4WLlUo%3D"/>
</body>
</html>
Which looked like the following:
As I said in the preamble, I'm unsure if this is what you are looking for since the requirements for the bounty was:
...to get access to amazons reviewrank informations
This isn't exactly the review rank information but the actual reviews and I take the meaning of review rank info to be more along the lines of the data itself (such as 100 reviews # 4 stars etc.). However, in your question you stated that the iframe did not work:
However, testing with the params they suggest to get the Iframe, but it seems that now even the Iframe doesn't work anymore.
So I thought that I would at least provide you with the proper method of getting and using the iframe.
Amazon has completely removed support for accessing rating/review information from their API. The docs mention a Response Element in the form of customer rating, but that doesn't work either.
Google shopping using Viewpoints for some reviews. I came across a good article for this
I know you said you don't want to screen scrape, but as that is the only solution available, I have been using the screen scraping solution for some time and it has not caused me a problem yet, although I agree it is fragile. If my screen scraping code does not get what it expects, it will log an error for me to adjust the code, and it will degrade gracefully to just display a link to open the review information in an iFrame. This error has yet to trigger and the solution has worked great for us.

Internet Explorer discards cookie when printing?

I have an unusual issue with this printing under IE7/8 (likely 6 as well).
My page contains a dynamically rendered graph. The contents of the graph are determined by the identity of the user who visits the page. The page is not available without prior authentication.
The page loads and renders correctly in IE7/8. However, the graph does NOT print correctly. When printing or print previewing, the graph fails to load (the red x appears). I've identified that when printing, the browser attempts to reload the image, but does not send the ASPXAUTH authentication cookie along with it. This is required to generate the image (due to permission enforcement in the back-end).
Can anyone help me identify why IE decides not to send this cookie, and is there a fix? Is it related to IEs known issues with modal dialogs?
I've run into this recently. IE reloads the image on print, and does send my current site cookies. However, in my case, the image has a redirect. When IE fetches the redirect for print, it omits the cookies.
It's strange behavior, but in my case, I was able to solve it by refactoring my image generation code to not issue a redirect. I don't know how helpful that is, but I hope it might provide insight to other people coming here for answers.
This is still true in IE 9.
What happens is that when printing, IE is requesting the image again, but it not sending any cookies.
But the image has already loaded, so why not just have IE use it from the cache rather than re-requesting the image?
All you have to do is when the image is requested, set the response headers to tell the browser to cache the image.
How to do this depends on your server's software stack.