jeudi 5 mai 2016

frisby: response data extraction and conditional execution

I'm trying to use frisby to do some testing or automation.

Say I have 2 requests that needs to be executed one after another. However, the first request creates a resource and returns it's URI in the header:

POST /resource

201 
Location: /resource/123

So the way the second call is made depends on the response header of the first one. afterJSON() looks promising but it doesn't seem to handle header. Documentation seems quite short and doesn't mention this. What to do?

Aucun commentaire:

Enregistrer un commentaire