Hacker News new | past | comments | ask | show | jobs | submit login

Really impressed. The ability to chain the http calls with assertions is great. The one thing I would prefer is to set the environment variables also in the .hurl file rather than in a .env file. Also, how do you access the key of a nested object?



You can use JSONPath asserts on responses, for instance:

  GET https://api.foo.net
  
  HTTP/1.1 200
  [Asserts]
  jsonpath "$.books[0].author.name" == "Hugo"


Thanks for this - became a big fan of Hurl. Created a guide on Hurl for calling API requests and used the array technique with [Captures]. [0]

[0] https://www.ayrshare.com/hurl-run-and-test-http-api-requests...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: