Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 1.2 KB

http-client.md

File metadata and controls

57 lines (48 loc) · 1.2 KB

HTTP Client

Initialize resource in config.yml:

resources:
  - name: # name of the resource
    type: http/client
    ready_check: false
    params:
      base_url: # application based url

Glossary

  • target - endpoint composed by request method & target separated by space

    Example:

    • GET /hello/world
    • POST http://google.com/hello/world

Actions

  • Send Request - to send http request
Given "$resourceName" send request to "$target"
  • Send Request with Body - to send http request with request body
Given "$resourceName" send request to "$target" with body
"""
    $requestBody
"""
Given "$resourceName" send request to "$target" with payload
"""
    $requestBody
"""
  • Check response code - to check response code of request that been made
Then "$resourceName" response code should be $statusCode
  • Check response header - to check header values of to a request that has been made
Then "$resourceName" repsonse header "$headerName" should be "$headerValue"
  • Check response body - to check response body of request that been made
Then "$resourceName" response body should be
"""
  $responseBody
"""