Skip to content

Request options in test cases

Prakhar Srivastav edited this page May 9, 2014 · 5 revisions

The request object available is now available in tests. The following properties are available on that object -

  • url: string - the final URL that the request is sent for
  • headers: object - Javascript object as a key-value pair
  • dataMode: string - One of raw, params and urlencoded
  • data: json

All values in data are strings. For example, form data of name = 'foo' and age = 10 will give you a json object like so { name: 'foo', age: '10' }

Clone this wiki locally