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

Request API call parse issue #333

Open
st-sathish opened this issue Aug 2, 2018 · 0 comments
Open

Request API call parse issue #333

st-sathish opened this issue Aug 2, 2018 · 0 comments

Comments

@st-sathish
Copy link

st-sathish commented Aug 2, 2018

I was sending Pojo object in the API call by calling the method (addBodyParamter) and seems like it was not converting Pojo into JSON object. When I was adding the interceptor, put debug and dive into the deep look I saw the FormBody object was sending in the request. I was following the similar way of doing code. am I missing any library? since I used neither Jackson Parser nor any third party library. I thinking about without Jackson Parser also it should work, right? or should I convert java object into JSON in the addBodyparameter manually?

Also, one more question. I have added this dependency

// network
implementation "com.amitshekhar.android:rx2-android networking:<version>"

No need to add rxJava and rxAndroid dependency rite? I think by default, rx2AndroidNetworking has those dependencies, right? just asking for confirmation?

@Override
    public Single<LoginResponse> doGoogleLoginApiCall(LoginRequest.GoogleLoginRequest
                                                              request) {
        return Rx2AndroidNetworking.post(ApiEndPoint.ENDPOINT_GOOGLE_LOGIN)
                .addHeaders(mApiHeader.getPublicApiHeader())
                .addBodyParameter(request)
                .build()
                .getObjectSingle(LoginResponse.class);
    }
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

No branches or pull requests

1 participant