* Creates a new instance using the same constructor as the current instance, copying the properties. * @return {Request}
()
| 90 | * @return {Request} |
| 91 | */ |
| 92 | clone() { |
| 93 | const newRequest = new (this.constructor)(); |
| 94 | const keysArray = Object.keys(this); |
| 95 | for (let i = 0; i < keysArray.length; i++) { |
| 96 | const key = keysArray[i]; |
| 97 | newRequest[key] = this[key]; |
| 98 | } |
| 99 | return newRequest; |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | /** |
no test coverage detected