Postman collections: how do I save my requests into a collection? - postman

I'd like to create a collection of requests in order to save them and share with collaborators.
I havent find any button, menu action to add new requests (or current request ) to the newly created folder Collection?
not so much intuitive...

I was able to do this by hitting the X to close a request. This popped up a warning asking if I want to save my request. I clicked on Save Changes, which then allowed me to save my request to a collection.

in the latest version of postman press ctrl+s -> and choose a collection to save into.

First create collection then create new request you will get option to save request "Save in existing collection" select your collection name and save it

Related

Google Apps Script - "authorization required" occurring in every Document created from template

I have a Google Document that has a custom UI menu with an option to add a new page to the Doc and populate it with some data. I use this Doc as template for creating numerous other Docs for a single user via webapp.
So my user comes to my webapp, clicks to generate this Document, the document is created from the aforementioned template Doc (containing the bound script to allow the user to add more pages with additional data). The user clicks in the custom menu to create a new page, and before that chunk of code is executed, he gets the 'Authorization Required' screen. I've already prepared him for this so he know how to proceed - no big deal. he goes on to use the Document for his tasks and closes it when he's finished.
He now needs to generate a new Document from the same template and add additional pages just as before. Once again, he gets the 'Authorization Required' screen. Now he's thinking 'I just authorized this... what's gong on?' and is now confused.
Since these Docs are generated on the fly from within the webapp, I have no way to go in and authorize anything but the script in the template before the user gets to it. But is there really no way to authorize that script in the template doc and have it carry over to all the new docs created from it?
Instead of including the code as a bounded project publish it as an add-on. This way the user only will have to authorize the code once.
Related
How to avoid re-authorization request for a copied Google Spreadsheet + script

How to add a POST request in an existing collection?

I am trying to add POST request to an existing collection, Here by default only get request available. How can i change that?
You could either
Open a new tab (cntrl + T for Win, Ubuntu), select the new blank tab, choose POST request from the drop to the left of the url. Once you enter all details click on the down arrow next to save (right of the URL). Click on save as and name your request, add an optional description and then select the collection you wish to add it to.
We have different postman versions so I am unable to see the Add Request option in my drop down, but I recon you could click that and follow above steps.

Why does Postman change saved API requests

I'm using Postman to test API and like its GUI and ease of use. But some things it does are completely incomprehensible to me. Example: I save an API request to a collection. Sometime later I try to recall it and it has changed. Why?
Scenario: testing against ElasticSearch API
GET _cat/indices.
Save to collection ElasticSearch.
Send other ES API requests.
Delete an index: DELETE /index0
Recall saved _cat/indices
Instead DELETE /index0 is recalled. Why?
It is possible that you turned off the "Always ask when closing unsaved tabs" option in Settings -> General. When this is off, it does not require you to hit Save, it will automatically save when the tab is closed.
Postman has tabs along the top, where each tab holds the data for a given request. When you edit the contents of a tab, you are editing the saved request as well. If you manually hit "save", the changes to the request are saved.
The way to avoid this would be to make sure that any time you are writing a new request and not intending to make it a change to an existing one, you do it in a new request tab (click the + button on the tab line), which you can then optionally save as a new named request.
To Turn Off Autosave, do the following:
Go to Settings -> General
Turn On Always ask when closing unsaved tabs.
Open a saved request, then change something in the request.
Close the request tab. Postman will ask if you want to save the changes. There will be a checkbox "to always discard unsaved changes". Tick the checkbox.
Click on "Don't Save".

C++ Outlook MailItem replace body and discard on close

I have an addon in Outlook which adds warning to mailbody and links in the email when email is coming from external or untrusted sources.
Anyway, when I replace something in body, when email is opened in full view (no reading pane, double click full view of mail item), I hook mailItem close even and I discard changes, everything works well. (mailitem.onclose(olDiscard))
When I do this with reading pane on, when I discard the changes, Outlook still either saves the changes or when user is trying to close Outlook it asks user "Do you want to save changes to ....." and if user clicked on multiple emails during this period, it shows popup question for ALL emails user clicked and we replaced its body.
What's the solution here? What can I do to fix this? I want to make changes to link and to body, but discard them when user clicks away on another email. End goal is not having Outlook to ask user "Do you want to save changes ..." popups. Please advise.
I can't also make changes to inspector, because inspector is read-only.
P.S. plugin is written in C++.
The solution is to avoid modifying the message body if you do not want to keep the changes.
If you want to show a warning to the user, add a task pane to the inspector. Or simply stamp the message with a category - it will be shown in the inspector.
The Outlook object model doesn't provide anything for handling hyperlinks clicks. As a possible workaround you may consider implementing the following functionality:
When the item is selected or opened in Outlook you may replace the original URL with your own where you can pass the original URL as an encoded parameter if needed. So, if it is allowed to open the URL you can redirect the request further. Note, you can use the SelectionChange event of the Explorer class which is fired when the user selects a different or additional Microsoft Outlook item programmatically or by interacting with the user interface. This event also occurs when the user (either programmatically or via the user interface) clicks or switches to a different folder that contains items, because Outlook automatically selects the first item in that folder. However, this event does not occur if the folder is a file-system folder or if any folder with a current Web view is displayed.
Also you may consider handling the Open event of Outlook items which is fired when an instance of the parent object is being opened in an Inspector. When this event occurs, the Inspector object is initialized but not yet displayed. The Open event differs from the Read event in that Read occurs whenever the user selects the item in a view that supports in-cell editing as well as when the item is being opened in an inspector.
Another possible solution is to register a custom URL handler. So, basically, your registered application will be launched instead of a web browser where you can decide whether to launch a web browser and follow the URL or not. See Installing and Registering Protocol Handlers for more information.

how to pass login credentials between pages in oracle apex?

I am creating a banking application using oracle apex. once the user have logged in using his customer id in page 2, his account details table should be displayed in the next page. I've tried with
select acc_no, bal from acc_details where cust_id= :P2_USERNAME
but I'm getting 'NO DATA FOUND'.
is this the correct way to do this? I've tried to use branches too. That was also not working.
On your first page, under the "Behavior"(APEX 5)/"Action When Button Clicked"(APEX 4) attribute of your log in button set "Action" to "Redirect to page in this Application". Then set the Target page number. Under that, you'll see the 'Set Items' part. Fill up that part by setting the "Name"(APEX 5) / "Set these Items"(APEX 4) with :P2_USERNAME and then "Value"(APEX 5)/ "With these Values"(APEX 4) with :P1_USERNAME. Get rid of the "branches" that you've created before or disable them at least for now.
if your user login name and userid is same (like email address)
you may use
apex_authentication.get_login_username_cookie
for getting username/user id at each page
or you can create an application item in shared component and assign user id to this item as
:MY_APP_ITEM := 'Hello';
after login and call it from all pages
Have you tried using :APP_USER? If that didn't work you could try creating an Application item as a value container for your cust_id. Just go to Shared Components >> Application Items then create an item. This way you could reuse the value on the application item until your session expire or you clear its value.
Say you've created an Application Item named "G_CUST_ID", you want to store your cust_id's value to G_CUST_ID. Create a PL/SQL process on your log in page and write the code below:
apex_util.set_session_state('G_CUST_ID', :P2_USERNAME);
The value set on G_CUST_ID will reset automatically on session expire. Don't forget to reset the value manually on Log Out.
apex_util.set_session_state('G_CUST_ID', NULL);