Skip to content

support invokeXXX method return Response #751

Open
@naah69

Description

@naah69

Describe the proposal

it is not support return Response(with code and headers) in invokeXXX method now.
it just convert body data by jackson and return.(there is a bug that jackson can't convert the string without json format)
image

it is unsupport if somebody need code and header.

i think that it needs deserialize layer and response interface(implement of http and grpc) to adapt.

use the below code to get Response.

invokeMethod(request,TypeRef<Response>)

Activity

skyao

skyao commented on Jun 30, 2022

@skyao
Member

I have talked with @naah69 about this issue and agreed with him that Dapr java sdk should support this feature because sometime the user need to get more information from HTTP response (for example, http headers).

This will make dapr java sdk more flexibility.

I will review the PR code.

naah69

naah69 commented on Jul 4, 2022

@naah69
Author

I have talked with @naah69 about this issue and agreed with him that Dapr java sdk should support this feature because sometime the user need to get more information from HTTP response (for example, http headers).

This will make dapr java sdk more flexibility.

I will review the PR code.

Is there any progress?

artursouza

artursouza commented on Jul 25, 2022

@artursouza
Contributor

We should create a new API that is HTTP specific instead of having a break change here. This API was originally designed to be protocol agnostic.

added this to the v1.7 milestone on Jul 25, 2022
yaron2

yaron2 commented on Jul 25, 2022

@yaron2
Member

We should create a new API that is HTTP specific instead of having a break change here. This API was originally designed to be protocol agnostic.

Using an HTTP client directly (which is the preferred method for service invocation) is essentially HTTP specific and will address the problem described here.

yaron2

yaron2 commented on Jul 25, 2022

@yaron2
Member

Discussion here: dapr/dotnet-sdk#526.

cc @rynowak

artursouza

artursouza commented on Jul 26, 2022

@artursouza
Contributor

We should create a new API that is HTTP specific instead of having a break change here. This API was originally designed to be protocol agnostic.

Using an HTTP client directly (which is the preferred method for service invocation) is essentially HTTP specific and will address the problem described here.

In Java SDK, we handle serialization on behalf of the user too (differently from .Net SDK). So there is an advantage of letting the SDK handle the abstraction for the user.

yaron2

yaron2 commented on Jul 26, 2022

@yaron2
Member

We should create a new API that is HTTP specific instead of having a break change here. This API was originally designed to be protocol agnostic.

Using an HTTP client directly (which is the preferred method for service invocation) is essentially HTTP specific and will address the problem described here.

In Java SDK, we handle serialization on behalf of the user too (differently from .Net SDK). So there is an advantage of letting the SDK handle the abstraction for the user.

Agreed

modified the milestones: v1.7, v1.8 on Sep 30, 2022
removed this from the v1.8 milestone on Feb 1, 2023
added and removed on Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @artursouza@skyao@yaron2@naah69

        Issue actions

          support invokeXXX method return Response · Issue #751 · dapr/java-sdk