The DefaultRequest feature overwrites any user specific data
- Dominant language
- Kotlin
- Stars
- 14.5k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 49
Description
### Ktor Version
1.1.1
### Ktor Engine Used(client or server and name)
N/A
### JVM Version, Operating System and Relevant Context
N/A
### Feedback
When using the `DefaultRequest` feature it prevents the caller being able to specify its own values.
For example if you do this:
```kotlin
defaultRequest {
url {
host = "example.com"
}
}
```
all requests will always be against the host `example.com` even if a user does this:
```kotlin
client.call(Url("https://google.com/foo"))
```
If anything the name of the feature is misleading and should perhaps be called `AllRequests` instead.
This is especially hard since a lot of properties in `Url` have default values of their own so it's hard to know if they have been set explicitly or not.
Contributor guide
Assessment
This issue has not been assessed yet.