Added an example of IBM Watson Language usage with Kamelet
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
diff --git a/ibm/ibm-watson-language/README.adoc b/ibm/ibm-watson-language/README.adoc
new file mode 100644
index 0000000..73f1c44
--- /dev/null
+++ b/ibm/ibm-watson-language/README.adoc
@@ -0,0 +1,289 @@
+= IBM Watson Natural Language Understanding Examples
+
+This example demonstrates how to use IBM Watson Natural Language Understanding (NLU) with Apache Camel to analyze text and extract insights like sentiment, emotions, entities, keywords, and concepts.
+
+== Prerequisites
+
+* IBM Cloud account with Watson Natural Language Understanding service instance
+* IBM Cloud API key with access to Watson NLU
+
+== Install Camel JBang
+
+include::../install.adoc[see installation]
+
+== Setup IBM Watson Natural Language Understanding
+
+=== Create Watson NLU Service Instance
+
+1. Log in to https://cloud.ibm.com[IBM Cloud Console]
+2. Create a Watson Natural Language Understanding service instance
+3. Go to the service credentials page
+4. Create new credentials or use existing ones
+5. Copy your API key
+
+=== Configure Service URL (Optional)
+
+Watson NLU provides different endpoints for different regions:
+
+* **US South**: `https://api.us-south.natural-language-understanding.watson.cloud.ibm.com`
+* **US East**: `https://api.us-east.natural-language-understanding.watson.cloud.ibm.com`
+* **EU GB (London)**: `https://api.eu-gb.natural-language-understanding.watson.cloud.ibm.com`
+* **EU DE (Frankfurt)**: `https://api.eu-de.natural-language-understanding.watson.cloud.ibm.com`
+* **Tokyo**: `https://api.jp-tok.natural-language-understanding.watson.cloud.ibm.com`
+* **Sydney**: `https://api.au-syd.natural-language-understanding.watson.cloud.ibm.com`
+
+For more information, see the https://cloud.ibm.com/apidocs/natural-language-understanding[Watson NLU API documentation].
+
+== Configuration
+
+Edit the `application.properties` file and update your IBM Cloud API key:
+
+[source,properties]
+----
+watson.apiKey=<your-ibm-cloud-api-key>
+# watson.serviceUrl=https://api.us-south.natural-language-understanding.watson.cloud.ibm.com
+----
+
+**Important**: Replace `<your-ibm-cloud-api-key>` with your actual IBM Cloud API key from the Watson NLU service credentials.
+
+== Example 1: Sentiment Analysis
+
+This integration analyzes text sentiment using Watson NLU every 30 seconds.
+
+=== How to run
+
+[source,shell]
+----
+camel run sentiment-analysis.camel.yaml application.properties
+----
+
+Or using the SNAPSHOT version:
+
+[source,shell]
+----
+jbang -Dcamel.jbang.version=4.16.0-SNAPSHOT camel@apache/camel run sentiment-analysis.camel.yaml ibm-watson-language-sink.kamelet.yaml application.properties
+----
+
+=== What it does
+
+The integration:
+1. Triggers every 30 seconds (3 times total)
+2. Analyzes the sentiment of a sample text
+3. Logs the sentiment label (positive/negative/neutral) and score
+4. Logs the detected language
+
+=== Expected Output
+
+[source,text]
+----
+Analyzing text: I love this product! It's absolutely amazing...
+Sentiment: positive (Score: 0.95)
+Detected Language: en
+----
+
+== Example 2: Comprehensive Analysis
+
+This integration performs comprehensive text analysis including sentiment, emotions, entities, keywords, and concepts.
+
+=== How to run
+
+[source,shell]
+----
+camel run comprehensive-analysis.camel.yaml application.properties
+----
+
+Or using the SNAPSHOT version:
+
+[source,shell]
+----
+jbang -Dcamel.jbang.version=4.16.0-SNAPSHOT camel@apache/camel run comprehensive-analysis.camel.yaml ibm-watson-language-sink.kamelet.yaml application.properties
+----
+
+=== What it does
+
+The integration:
+1. Triggers every 60 seconds (2 times total)
+2. Analyzes text for:
+ - **Sentiment** - Positive/negative/neutral sentiment with score
+ - **Emotions** - Joy, anger, sadness, fear, disgust
+ - **Entities** - People, companies, organizations, locations
+ - **Keywords** - Important keywords and phrases
+ - **Concepts** - High-level concepts
+3. Logs the complete analysis results
+
+=== Expected Output
+
+[source,text]
+----
+=== Analysis Results ===
+Sentiment: positive (Score: 0.87)
+Language: en
+Full Analysis Results: {
+ "sentiment": {
+ "document": {
+ "score": 0.87,
+ "label": "positive"
+ }
+ },
+ "entities": [
+ {"type": "Company", "text": "Apple Inc.", "relevance": 0.98}
+ ],
+ "keywords": [
+ {"text": "profits", "relevance": 0.89},
+ {"text": "artificial intelligence", "relevance": 0.85}
+ ],
+ ...
+}
+----
+
+== Example 3: Text Analysis HTTP API
+
+This integration exposes REST API endpoints for text analysis.
+
+=== How to run
+
+[source,shell]
+----
+camel run text-analysis-api.camel.yaml application.properties
+----
+
+Or using the SNAPSHOT version:
+
+[source,shell]
+----
+jbang -Dcamel.jbang.version=4.16.0-SNAPSHOT camel@apache/camel run text-analysis-api.camel.yaml ibm-watson-language-sink.kamelet.yaml application.properties
+----
+
+=== Available Endpoints
+
+The integration exposes three HTTP endpoints:
+
+==== 1. Sentiment Analysis API
+
+Analyzes sentiment and emotions of the provided text.
+
+[source,shell]
+----
+curl -X POST http://localhost:8080/analyze/sentiment \
+ -H "Content-Type: text/plain" \
+ -d "This is an amazing product! I'm so happy with my purchase."
+----
+
+**Response:**
+[source,json]
+----
+{
+ "sentiment": {
+ "document": {
+ "score": 0.92,
+ "label": "positive"
+ }
+ },
+ "emotion": {
+ "document": {
+ "emotion": {
+ "joy": 0.85,
+ "sadness": 0.02,
+ "fear": 0.01,
+ "disgust": 0.01,
+ "anger": 0.01
+ }
+ }
+ },
+ "language": "en"
+}
+----
+
+==== 2. Entity Extraction API
+
+Extracts entities and keywords from the text.
+
+[source,shell]
+----
+curl -X POST http://localhost:8080/analyze/entities \
+ -H "Content-Type: text/plain" \
+ -d "IBM Watson is located in Armonk, New York. The company develops AI solutions."
+----
+
+**Response:**
+[source,json]
+----
+{
+ "entities": [
+ {
+ "type": "Company",
+ "text": "IBM Watson",
+ "relevance": 0.99,
+ "count": 1
+ },
+ {
+ "type": "Location",
+ "text": "Armonk",
+ "relevance": 0.85
+ }
+ ],
+ "keywords": [
+ {
+ "text": "AI solutions",
+ "relevance": 0.87
+ }
+ ],
+ "language": "en"
+}
+----
+
+==== 3. Comprehensive Analysis API
+
+Performs complete analysis including sentiment, emotions, entities, keywords, and concepts.
+
+[source,shell]
+----
+curl -X POST http://localhost:8080/analyze/all \
+ -H "Content-Type: text/plain" \
+ -d "Apple announced groundbreaking AI technology that will revolutionize healthcare."
+----
+
+**Response:**
+[source,json]
+----
+{
+ "sentiment": {"document": {"score": 0.78, "label": "positive"}},
+ "emotion": {"document": {"emotion": {"joy": 0.65, ...}}},
+ "entities": [{"type": "Company", "text": "Apple", ...}],
+ "keywords": [{"text": "AI technology", "relevance": 0.92}, ...],
+ "concepts": [{"text": "Artificial intelligence", "relevance": 0.89}, ...],
+ "language": "en"
+}
+----
+
+=== Testing the API
+
+You can also test with longer text:
+
+[source,shell]
+----
+curl -X POST http://localhost:8080/analyze/sentiment \
+ -H "Content-Type: text/plain" \
+ -d @sample-text.txt
+----
+
+== Developer Web Console
+
+You can enable the developer console via `--console` flag:
+
+[source,shell]
+----
+camel run text-analysis-api.camel.yaml ibm-watson-language-sink.kamelet.yaml application.properties --console
+----
+
+Then browse to http://localhost:8080/q/dev to introspect the running Camel application.
+
+== Help and contributions
+
+If you hit any problem using Camel or have some feedback, then please
+https://camel.apache.org/community/support/[let us know].
+
+We also love contributors, so
+https://camel.apache.org/community/contributing/[get involved] :-)
+
+The Camel riders!
diff --git a/ibm/ibm-watson-language/application.properties b/ibm/ibm-watson-language/application.properties
new file mode 100644
index 0000000..1d2bc52
--- /dev/null
+++ b/ibm/ibm-watson-language/application.properties
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# IBM Watson Natural Language Understanding Configuration
+watson.apiKey=<api-key>
+
+# Optional: Specify the Watson NLU service URL for your region
+# Default: https://api.us-south.natural-language-understanding.watson.cloud.ibm.com
+# watson.serviceUrl=https://api.us-south.natural-language-understanding.watson.cloud.ibm.com
+
+# Regional endpoints:
+# US South: https://api.us-south.natural-language-understanding.watson.cloud.ibm.com
+# US East: https://api.us-east.natural-language-understanding.watson.cloud.ibm.com
+# EU GB (London): https://api.eu-gb.natural-language-understanding.watson.cloud.ibm.com
+# EU DE (Frankfurt): https://api.eu-de.natural-language-understanding.watson.cloud.ibm.com
+# Tokyo: https://api.jp-tok.natural-language-understanding.watson.cloud.ibm.com
+# Sydney: https://api.au-syd.natural-language-understanding.watson.cloud.ibm.com
diff --git a/ibm/ibm-watson-language/comprehensive-analysis.camel.yaml b/ibm/ibm-watson-language/comprehensive-analysis.camel.yaml
new file mode 100644
index 0000000..68313b0
--- /dev/null
+++ b/ibm/ibm-watson-language/comprehensive-analysis.camel.yaml
@@ -0,0 +1,48 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+- route:
+ from:
+ uri: "timer:analyze"
+ parameters:
+ period: "60000"
+ repeatCount: "2"
+ steps:
+ - setBody:
+ constant: "Apple Inc. announced record-breaking profits in its latest quarterly earnings. The company's CEO praised the innovative team for their groundbreaking work on artificial intelligence and sustainable technology. Investors are optimistic about the future growth potential."
+ - log:
+ message: "Analyzing comprehensive text: ${body}"
+ - to:
+ uri: "kamelet:ibm-watson-language-sink"
+ parameters:
+ apiKey: "RAW({{watson.apiKey}})"
+ serviceUrl: "{{?watson.serviceUrl}}"
+ operation: "analyzeText"
+ analyzeSentiment: "true"
+ analyzeEmotion: "true"
+ analyzeEntities: "true"
+ analyzeKeywords: "true"
+ analyzeConcepts: "true"
+ analyzeCategories: "false"
+ - log:
+ message: "=== Analysis Results ==="
+ - log:
+ message: "Sentiment: ${header.CamelIBMWatsonLanguageSentimentLabel} (Score: ${header.CamelIBMWatsonLanguageSentimentScore})"
+ - log:
+ message: "Language: ${header.CamelIBMWatsonLanguageLanguage}"
+ - log:
+ message: "Full Analysis Results: ${body}"
diff --git a/ibm/ibm-watson-language/ibm-watson-language-sink.kamelet.yaml b/ibm/ibm-watson-language/ibm-watson-language-sink.kamelet.yaml
new file mode 100644
index 0000000..6544d4b
--- /dev/null
+++ b/ibm/ibm-watson-language/ibm-watson-language-sink.kamelet.yaml
@@ -0,0 +1,129 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1
+kind: Kamelet
+metadata:
+ name: ibm-watson-language-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "4.16.0-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgPHBhdGggZD0iTTAgMGgyNTZ2MjU2SDB6Ii8+CiAgICA8cGF0aCBkPSJNMTI4IDIwYTEwOCAxMDggMCAxIDEgMCAyMTYgMTA4IDEwOCAwIDAgMSAwLTIxNnptMCAyNGE4NCA4NCAwIDEgMCAwIDE2OCA4NCA4NCAwIDAgMCAwLTE2OHoiIGZpbGw9IiMwNTNFRkYiLz4KICAgIDxwYXRoIGQ9Ik0xMjggNzJhNTYgNTYgMCAxIDEgMCAxMTIgNTYgNTYgMCAwIDEgMC0xMTJ6bTAgMjRhMzIgMzIgMCAxIDAgMCA2NCAzMiAzMiAwIDAgMCAwLTY0eiIgZmlsbD0iIzA1M0VGRiIvPgogIDwvZz4KPC9zdmc+"
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "IBM Watson"
+ camel.apache.org/kamelet.namespace: "IBM"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "IBM Watson Natural Language Understanding Sink"
+ description: Analyze text using IBM Watson Natural Language Understanding to extract sentiment, entities, keywords, concepts, categories, and emotions.
+ required:
+ - apiKey
+ type: object
+ properties:
+ apiKey:
+ title: API Key
+ description: The IBM Cloud API key for Watson Natural Language Understanding.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:camel:group:credentials
+ serviceUrl:
+ title: Service URL
+ description: The Watson Natural Language Understanding service endpoint URL. If not specified, the default URL will be used.
+ type: string
+ example: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com"
+ operation:
+ title: Operation
+ description: The operation to perform.
+ type: string
+ default: analyzeText
+ enum:
+ - analyzeText
+ - analyzeUrl
+ analyzeSentiment:
+ title: Analyze Sentiment
+ description: Enable sentiment analysis to detect positive, negative, or neutral sentiment.
+ type: boolean
+ default: true
+ analyzeEmotion:
+ title: Analyze Emotion
+ description: Enable emotion analysis to detect emotions like joy, anger, sadness, fear, and disgust.
+ type: boolean
+ default: false
+ analyzeEntities:
+ title: Analyze Entities
+ description: Enable entity extraction to identify people, companies, organizations, cities, and more.
+ type: boolean
+ default: true
+ analyzeKeywords:
+ title: Analyze Keywords
+ description: Enable keyword extraction to identify important keywords and phrases.
+ type: boolean
+ default: true
+ analyzeConcepts:
+ title: Analyze Concepts
+ description: Enable concept extraction to identify high-level concepts that aren't necessarily mentioned in the text.
+ type: boolean
+ default: false
+ analyzeCategories:
+ title: Analyze Categories
+ description: Enable category classification to classify content into a hierarchy of categories.
+ type: boolean
+ default: false
+ dataTypes:
+ out:
+ default: watson-analysis
+ headers:
+ CamelIBMWatsonLanguageSentimentLabel:
+ title: Sentiment Label
+ description: The sentiment label (positive, negative, or neutral).
+ type: string
+ CamelIBMWatsonLanguageSentimentScore:
+ title: Sentiment Score
+ description: The sentiment score (-1 to 1, where -1 is most negative and 1 is most positive).
+ type: number
+ CamelIBMWatsonLanguageLanguage:
+ title: Detected Language
+ description: The detected language of the analyzed text.
+ type: string
+ types:
+ watson-analysis:
+ format: "application-json"
+ description: Watson Natural Language Understanding analysis results containing sentiment, entities, keywords, concepts, categories, and emotions.
+ mediaType: application/json
+ dependencies:
+ - "camel:core"
+ - "camel:ibm-watson-language"
+ - "camel:kamelet"
+ template:
+ from:
+ uri: "kamelet:source"
+ steps:
+ - to:
+ uri: "ibm-watson-language:analyze"
+ parameters:
+ apiKey: "RAW({{apiKey}})"
+ serviceUrl: "{{?serviceUrl}}"
+ operation: "{{operation}}"
+ analyzeSentiment: "{{analyzeSentiment}}"
+ analyzeEmotion: "{{analyzeEmotion}}"
+ analyzeEntities: "{{analyzeEntities}}"
+ analyzeKeywords: "{{analyzeKeywords}}"
+ analyzeConcepts: "{{analyzeConcepts}}"
+ analyzeCategories: "{{analyzeCategories}}"
diff --git a/ibm/ibm-watson-language/sentiment-analysis.camel.yaml b/ibm/ibm-watson-language/sentiment-analysis.camel.yaml
new file mode 100644
index 0000000..bef390f
--- /dev/null
+++ b/ibm/ibm-watson-language/sentiment-analysis.camel.yaml
@@ -0,0 +1,44 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+- route:
+ from:
+ uri: "timer:sentiment"
+ parameters:
+ period: "30000"
+ repeatCount: "3"
+ steps:
+ - setBody:
+ constant: "I love this product! It's absolutely amazing and exceeded all my expectations. The customer service was outstanding!"
+ - log:
+ message: "Analyzing text: ${body}"
+ - to:
+ uri: "kamelet:ibm-watson-language-sink"
+ parameters:
+ apiKey: "RAW({{watson.apiKey}})"
+ serviceUrl: "{{?watson.serviceUrl}}"
+ operation: "analyzeText"
+ analyzeSentiment: "true"
+ analyzeEmotion: "false"
+ analyzeEntities: "false"
+ analyzeKeywords: "false"
+ analyzeConcepts: "false"
+ analyzeCategories: "false"
+ - log:
+ message: "Sentiment: ${header.CamelIBMWatsonLanguageSentimentLabel} (Score: ${header.CamelIBMWatsonLanguageSentimentScore})"
+ - log:
+ message: "Detected Language: ${header.CamelIBMWatsonLanguageLanguage}"
diff --git a/ibm/ibm-watson-language/text-analysis-api.camel.yaml b/ibm/ibm-watson-language/text-analysis-api.camel.yaml
new file mode 100644
index 0000000..d1b9284
--- /dev/null
+++ b/ibm/ibm-watson-language/text-analysis-api.camel.yaml
@@ -0,0 +1,86 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+- route:
+ id: "analyze-sentiment-api"
+ from:
+ uri: "platform-http:/analyze/sentiment?httpMethodRestrict=POST"
+ steps:
+ - log:
+ message: "Received text for sentiment analysis: ${body}"
+ - to:
+ uri: "ibm-watson-language:api"
+ parameters:
+ apiKey: "RAW({{watson.apiKey}})"
+ serviceUrl: "{{?watson.serviceUrl}}"
+ operation: "analyzeText"
+ analyzeSentiment: "true"
+ analyzeEmotion: "true"
+ analyzeEntities: "false"
+ analyzeKeywords: "false"
+ - setHeader:
+ name: "Content-Type"
+ constant: "application/json"
+ - marshal:
+ json: {}
+
+- route:
+ id: "analyze-entities-api"
+ from:
+ uri: "platform-http:/analyze/entities?httpMethodRestrict=POST"
+ steps:
+ - log:
+ message: "Received text for entity extraction: ${body}"
+ - to:
+ uri: "kamelet:ibm-watson-language-sink"
+ parameters:
+ apiKey: "RAW({{watson.apiKey}})"
+ serviceUrl: "{{?watson.serviceUrl}}"
+ operation: "analyzeText"
+ analyzeSentiment: "false"
+ analyzeEmotion: "false"
+ analyzeEntities: "true"
+ analyzeKeywords: "true"
+ - setHeader:
+ name: "Content-Type"
+ constant: "application/json"
+ - marshal:
+ json: {}
+
+- route:
+ id: "analyze-comprehensive-api"
+ from:
+ uri: "platform-http:/analyze/all?httpMethodRestrict=POST"
+ steps:
+ - log:
+ message: "Received text for comprehensive analysis: ${body}"
+ - to:
+ uri: "ibm-watson-language:api"
+ parameters:
+ apiKey: "RAW({{watson.apiKey}})"
+ serviceUrl: "{{?watson.serviceUrl}}"
+ operation: "analyzeText"
+ analyzeSentiment: "true"
+ analyzeEmotion: "true"
+ analyzeEntities: "true"
+ analyzeKeywords: "true"
+ analyzeConcepts: "true"
+ - setHeader:
+ name: "Content-Type"
+ constant: "application/json"
+ - marshal:
+ json: {}