Hi there,
The API I am testing returns the following as an example of the structure of the response when I use the OPTIONS verb:
<table border="1">
<colgroup>
<col />
<col />
<col />
<col />
</colgroup>
<tbody>
<tr>
<th colspan="4">
<p>Clients</p>
</th>
When I attempt to store this structure into a variable to verify that the response returned from Postman is what I expect, I receive an error in the Postman Console saying the following: “SyntaxError | Unexpected token <”
I can store the response body inside of a variable no problem when using the GET and POST verbs:
var yourExpectedResponse = {}
I can paste my response inside the brackets and the code works great. However, when I do the same for the response body I receive when using the OPTIONS verb, it doesn’t work. The structure of the response is different when using the OPTIONS verb and the structure is what seems to be throwing Postman off.
Does anyone know how to correctly handle such a case?