Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds read content value #159

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [1.4.0] - 2024-03-07

### Added

- Returns an `io.ReadCloser` for streamed responses, allows passing an `io.ReadCloser` to request information.

### Changed

## [1.3.2] - 2024-02-28

### Changed
Expand Down
6 changes: 6 additions & 0 deletions nethttp_request_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@
reader := bytes.NewReader(requestInfo.Content)
request.Body = NopCloser(reader)
}
if requestInfo.ContentReader != nil {

Check failure on line 281 in nethttp_request_adapter.go

View workflow job for this annotation

GitHub Actions / build

requestInfo.ContentReader undefined (type *abstractions.RequestInformation has no field or method ContentReader)

Check failure on line 281 in nethttp_request_adapter.go

View workflow job for this annotation

GitHub Actions / SonarCloud

requestInfo.ContentReader undefined (type *abstractions.RequestInformation has no field or method ContentReader)
request.Body = requestInfo.ContentReader

Check failure on line 282 in nethttp_request_adapter.go

View workflow job for this annotation

GitHub Actions / build

requestInfo.ContentReader undefined (type *abstractions.RequestInformation has no field or method ContentReader)

Check failure on line 282 in nethttp_request_adapter.go

View workflow job for this annotation

GitHub Actions / SonarCloud

requestInfo.ContentReader undefined (type *abstractions.RequestInformation has no field or method ContentReader)
}
if request.Header == nil {
request.Header = make(nethttp.Header)
}
Expand Down Expand Up @@ -575,6 +578,9 @@
}
return res, nil
}
if typeName == "io.ReadCloser" {
return response.Body, nil
}
parseNode, _, err := a.getRootParseNode(ctx, response, span)
if err != nil {
return nil, err
Expand Down
Loading