Giter Site home page Giter Site logo

Comments (12)

amitshekhariitbhu avatar amitshekhariitbhu commented on April 28, 2024

Just checked, it should work ...may be you should use Authorization Bearer Instead of token.

from fast-android-networking.

LOWANGA avatar LOWANGA commented on April 28, 2024

headParams.put("Content-Type", "application/json"); this is no action

from fast-android-networking.

LOWANGA avatar LOWANGA commented on April 28, 2024

how to set it Content-Type

from fast-android-networking.

amitshekhariitbhu avatar amitshekhariitbhu commented on April 28, 2024

For setting custom content type I have aded support.. Will make live in next release
As of now I have uploaded it on beta.

So please compile using the below link.

compile 'com.amitshekhar.android:android-networking:0.2.0-beta-0'

If there is any problem or suggestion. Tell me.

setContentType("application/json; charset=utf-8") - in post request I have added.

from fast-android-networking.

amitshekhariitbhu avatar amitshekhariitbhu commented on April 28, 2024

Default content type are added on the basis of body sent to post request . But now you can add this as I explained above

from fast-android-networking.

LOWANGA avatar LOWANGA commented on April 28, 2024

ok i will try it ,thanks

from fast-android-networking.

LOWANGA avatar LOWANGA commented on April 28, 2024

public static void postStringJson(String url, HashMap<String,String> params,StringRequestListener listener){
AndroidNetworking.post(url).setContentType("application/json; charset=utf-8").addHeaders(getRequestHeader()).addBodyParameter(params).build().getAsString(listener);
}
I like this,but my server return this {"code":"server.internal","desc":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported"} error ,so I think it be covered

from fast-android-networking.

amitshekhariitbhu avatar amitshekhariitbhu commented on April 28, 2024

Ok will check it and fix it if there is a bug and will inform u

from fast-android-networking.

LOWANGA avatar LOWANGA commented on April 28, 2024

thanks

from fast-android-networking.

LOWANGA avatar LOWANGA commented on April 28, 2024

is ok?

from fast-android-networking.

amitshekhariitbhu avatar amitshekhariitbhu commented on April 28, 2024

In the beta version, there is no way to set custom ContentType addBodyParameter, but in other method like addJSONObjectBody, addJSONArrayBody, addStringBody, addFileBody, you can add custom ContentType, I will try to add it in new release. Will inform you soon on new release.

from fast-android-networking.

LOWANGA avatar LOWANGA commented on April 28, 2024

thanks i used addStringBody can do it

from fast-android-networking.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.