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

[DLS-10533] migrating from http client to http client v2 #287

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ruthdas03
Copy link
Contributor

@ruthdas03 ruthdas03 commented Oct 11, 2024

No description provided.

@ruthdas03 ruthdas03 force-pushed the DLS-10533_Migrating_from_HttpClient_to_HttpClientV2 branch from f8ca6bf to 4c4ae8e Compare October 21, 2024 13:25
@ruthdas03 ruthdas03 marked this pull request as ready for review October 21, 2024 13:25
@mahesh-hmrc
Copy link
Contributor

Also, now that they are resolved, can we remove the test failure descriptions from the PR comment. Thanks

@ruthdas03
Copy link
Contributor Author

Also, now that they are resolved, can we remove the test failure descriptions from the PR comment. Thanks

Removed them

mahesh-hmrc
mahesh-hmrc previously approved these changes Oct 23, 2024
ec: ExecutionContext): Future[HttpResponse] =
http.post(barsEndpoint, bodyJson(request), headers.+("X-Tracking-Id" -> trackingId.toString))
ec: ExecutionContext): Future[HttpResponse] = {
http.post(barsEndpoint).withBody(bodyJson(request)).transform(_.addHttpHeaders(headers, "X-Tracking-Id" -> trackingId.toString)).execute[HttpResponse]
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, missed this in previous review.
Would it also make sense to capture the return type as Either[UpstreamErrorResponse, HttpResponse] here? This might need tests being tidied up to reflect the change

While doing that, could you also check on other connectors making sure of the return type and error handling in calling code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants