Skip to content

Change RecordedRequest.body to a ByteString#8856

Merged
swankjesse merged 2 commits into
masterfrom
jwilson.0614.recordedrequest
Jun 14, 2025
Merged

Change RecordedRequest.body to a ByteString#8856
swankjesse merged 2 commits into
masterfrom
jwilson.0614.recordedrequest

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

Immutable is good.

else -> "${inetAddress.hostAddress}:$localPort"
}
/** The body of this request, or [ByteString.EMPTY] if it has none. This may be truncated. */
public val body: ByteString,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any argument for nullable?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m certainly tempted. Yeah, lemme do that in follow-up.

import okhttp3.internal.platform.Platform
import okio.Buffer

internal fun RecordedRequest(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice backwards compat

@swankjesse
swankjesse merged commit b418183 into master Jun 14, 2025
22 checks passed
@swankjesse
swankjesse deleted the jwilson.0614.recordedrequest branch June 14, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants