swift-server / swift-server/async-http-client

HTTPClient.Request.url is a let constant

Open
#395 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
1.1k
Forks
156
PR merge metrics
No merged PRs in 30d

Description

HTTPClient.Request is a value type (as it should be). Its properties should be mutable (var).
Otherwise a mere

var request = request
request.url = newURL

becomes a tedious

var request = request
request =HTTPClient.Request(url: newURL,
                               method: request.method,
                               headers: request.headers,
                               body: request.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

Find the definition of HTTPClient.Request and inspect how its url and other properties are declared. Verify that a request value can be copied and assigned a new url directly, and confirm the existing request behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
backend-api-design
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.