From 37a2aaaf659cd947f2fc5f2a0a7e1e28a6861f98 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Tue, 14 Mar 2017 15:21:03 +0900 Subject: [PATCH] Fix typos in the document: `_request_` -> `_response_` :dizzy_face: --- app/models/agents/website_agent.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/agents/website_agent.rb b/app/models/agents/website_agent.rb index 37fd780a..67d7a9d9 100644 --- a/app/models/agents/website_agent.rb +++ b/app/models/agents/website_agent.rb @@ -119,7 +119,7 @@ module Agents If a `template` option is given, its value must be a hash, whose key-value pairs are interpolated after extraction for each iteration and merged with the payload. In the template, keys of extracted data can be interpolated, and some additional variables are also available as explained in the next section. For example: "template": { - "url": "{{ url | to_uri: _request_.url }}", + "url": "{{ url | to_uri: _response_.url }}", "description": "{{ body_text }}", "last_modified": "{{ _response_.headers.Last-Modified | date: '%FT%T' }}" } @@ -138,7 +138,7 @@ module Agents * `headers`: Response headers; for example, `{{ _response_.headers.Content-Type }}` expands to the value of the Content-Type header. Keys are insensitive to cases and -/_. When parsing `data_from_event`, this is constructed from the value of the `headers` key in the incoming Event, if it is a hash. - * `url`: The final URL of the fetched page, following redirects. When parsing `data_from_event`, this is set to the value of the `url` key in the incoming Event. Using this in the `template` option, you can resolve relative URLs extracted from a document like `{{ link | to_uri: _request_.url }}` and `{{ content | rebase_hrefs: _request_.url }}`. + * `url`: The final URL of the fetched page, following redirects. When parsing `data_from_event`, this is set to the value of the `url` key in the incoming Event. Using this in the `template` option, you can resolve relative URLs extracted from a document like `{{ link | to_uri: _response_.url }}` and `{{ content | rebase_hrefs: _response_.url }}`. # Ordering Events