Postman is a API testing tool, so there is no deployment. To get it go to Postman website.
With Postman, you will need to create a request for each functions. Here some requirements:
- Set the request to POST.
- Add a header: Content-Type = application/json
- Use the URL WITH the security
Code
if the function as one. (Read here to learn how to get the URLs )
In Postman, use the URL from the UrlShortener Azure Function. In the body of the request, add a JSON document containing two properties.
See the examples bellow to create short generic URL.
{
"url": "http://www.frankysnotes.com/2020/03/reading-notes-416.html",
"vanity": ""
}
If you prefer you can pass a vanity
to have control on the end part of the Url. In this sample the vanity is rn-416
.
{
"url": "http://www.frankysnotes.com/2020/03/reading-notes-416.html",
"vanity": "rn-416"
}
To execute the call click the Send button. The response will be:
{
"ShortUrl": "http://localhost:7071/2r",
"LongUrl": "http://www.frankysnotes.com/2020/03/reading-notes-416.html"
}
In Postman, use the URL from the UrlList Azure Function. Set the request to GET. No body content is required for this request. However, make sure the url contains the security token code
.
https://shortenertools.azurewebsites.net/api/UrlList?code=JVzE6CvlEHxDHbq.....
To execute the call click the Send button. The response will be a json document with an array:
{
"UrlList": [
{
"Url": "http://www.frankysnotes.com/2020/03/reading-notes-416.html",
"PartitionKey": "2",
"RowKey": "2r",
"Timestamp": "2020-03-20T13:43:47.5758051+00:00",
"ETag": "W/\"datetime'2020-03-20T13%3A43%3A47.5758051Z'\""
},
{
"Url": "http://www.frankysnotes.com/2020/03/reading-notes-416.html",
"PartitionKey": "t",
"RowKey": "test10h24",
"Timestamp": "2020-03-27T14:26:44.4342376+00:00",
"ETag": "W/\"datetime'2020-03-27T14%3A26%3A44.4342376Z'\""
},
{
"Url": "https://www.frankysnotes.com/2020/03/reading-notes-416.html",
"PartitionKey": "z",
"RowKey": "z10test",
"Timestamp": "2020-03-20T15:27:08.8691188+00:00",
"ETag": "W/\"datetime'2020-03-20T15%3A27%3A08.8691188Z'\""
}
]
}
If you have question or encounter any problem using this admin interface with AzShortenerUrl please feel free to ask help in the issues section.