Orange-OpenSource / Orange-OpenSource/hurl
Support Template in XML Body
Open
Nobody has claimed this yet.
enhancement
topic: xml
- Dominant language
- Rust
- Stars
- 19.2k
- Forks
- 745
- Avg merge
- 5h 3m
- Merged PRs (30d)
- 60
Description
Contrary to JSON body, the template body should still a valid XML.
Variables are encapsulated within an XML atttribute and XML text content.
<user name="{{name}}"/>
<value>{{value}}</value>
Similarly to JSON, value should be escaped automatically.
[Variables]
delimiter="\u{0022}" # this is the double-quote
count=10
status=true
# JSON sent
# {
# "delimiter": "\"",
# "count": 10,
# "status": true
# }
POST http::/localhost:8000/json
{
"delimiter": "{{delimiter}}",
"count": {{count}},
"status": {{status}}
}
# XML sent
# <variables>
# <variable name="delimiter" value="""/>
# <variable name="count" value="10"/>
# <variable name="status" value="true"/>
# </variables>
POST http::/localhost:8000/xml
<variables>
<variable name="delimiter" value="{{delimiter}}"/>
<variable name="count" value="{{count}}"/>
<variable name="status" value="{{status}}"/>
</variables>
It should be consistent with the existing template support in JSON body.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files or tests; start by locating the existing JSON body template handling in the request-body path. Trace how variables are substituted, then check the XML examples for attribute and text-content escaping. Done means XML templates remain valid after substitution and behave consistently with JSON templates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, xml
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100