You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have an HTTP response with a numeic header : Age: 1337.
I I try to assert a numeric value I get a type error.
header "age" >= 0 gives this error :
error: Assert failure
--> tests/foo.hurl:30:0
|
30 | header "age" >= 0
| actual: string <592>
| expected: greater or equal than int <0>
| >>> types between actual and expected are not consistent
|
Hi @jlecour,
your understanding is right, the value returned by the header query is always a String.
And having a cast filter would indeed feel quite natural. Thanks for your suggestion.
We plan to add a few more filters for the next release, we could include yours.
Hi,
Let's say I have an HTTP response with a numeic header :
Age: 1337
.I I try to assert a numeric value I get a type error.
header "age" >= 0
gives this error :header "age" isInteger
gives this error :Is there a filter to force the type casting ?
I feel like I'm missing something here.
I know I cound do this, but it's not great :
Thanks
The text was updated successfully, but these errors were encountered: