Orange-OpenSource / Orange-OpenSource/hurl

Support Template in XML Body

Open
#1,920 0 comments 0 reactions 0 assignees View on GitHub

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="&#34;"/>
#  <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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.