Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
How to verify content of Response Header contains a given string
I have a REST API call that returns the following in the Response Header:
Content-Disposition: attachment; filename=cmdownloads.zip
I need to verify that the filename is "cmdownloads.zip" (in this case).
I captured the Header in a Header Bank but am unsure what to do next. I have tried converting it to XML and think I should be able to use an assertor with a regular expression assertion but am unsure of the exact syntax.
You could add a Search Tool (with the expected filename as a search term) to Response\Transport Header.0
Sorry I am not an advanced user, can you give me specific steps for how to do that? I haven't run into a Search Tool yet.0
Oh, I found it! It seems to have worked too, thanks very much.0
happy it worked!0