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

header for all request #3

Open
croccio opened this issue May 4, 2018 · 7 comments
Open

header for all request #3

croccio opened this issue May 4, 2018 · 7 comments

Comments

@croccio
Copy link

croccio commented May 4, 2018

is there anyway to put same header for all request?

@ravindu1024
Copy link
Owner

Can you explain a little bit?

@androidlover5842
Copy link

how deserializeList works can you explain pelase ?

@ravindu1024
Copy link
Owner

ravindu1024 commented Jul 22, 2019 via email

@androidlover5842
Copy link

okay thanks

@androidlover5842
Copy link

@ravindu1024 how do i post this type of from-data using object class since there is only function to post hashmap or jsontype format :(
Screenshot from 2019-07-25 19-36-01

@ravindu1024
Copy link
Owner

ravindu1024 commented Jul 25, 2019 via email

@androidlover5842
Copy link

i managed to do :) seems to working fine for now.

    if (postModel!=null)
        try {
            JSONObject jobj = new JSONObject(new Gson().toJson(postModel));
            Iterator<String> iterator=jobj.keys();
            while (iterator.hasNext())
            {
                String key=iterator.next();
                String val=jobj.getString(key);
                if (val!=null)
                    stringObjectHashMap.put(key,val);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }

    Velocity.get(url)
            .withRequestMethod(method.name())
            .withBody(stringObjectHashMap)

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

3 participants