Coder Social home page Coder Social logo

exvolley's Introduction

#ExVolley

先吐槽

Google的Volley很好很强大,但这货就是个sample,明明有大招的命却很难放出来。所以像Saber那样大喊一声Excalibur就能用才是王道

##Features

  • Use OkHttp as HttpStack,support SDPY
  • Easy to use Fluent API designed for Android
  • As powerful as Volley

##Samples

###Get JSON ExVolley.with(context).load("http://example.com/api/") .method(GET) .setResponseListener(listener. JsonObject.class) .setErrorListener(errorListener) .execute(); ###Post JSON ExVolley.with(context).load("https://example.com/api/") .method(POST) .asJsonRequest() .setJsonBody(json) .setResponseListener(listener, JsonArray.class) .setErrorListner(errorListener) .execute(); ###Set GET Params ExVolley.with(context).load("http:/example.com/api") .method(GET) .setParam("name", "jack") .setParams(hashmap) ... ExVolley parse params to url automatic.

###Set POST Params ExVolley.with(context).load("http:/example.com/api") .method(POST) .setParam("name", "jack") .setParams(hashmap) ...

###cancel request = ExVolley.with(context).load("http:/example.com/api") .method(POST) .setTag("TAG") ... .execute()

ExVolley.cancel("TAG") or request.cancel()

You'd better put it in onDestory()

###More * setHeader(String key, String value) * shouldCache(Boolean should) * setRequestBody(String body) * setContentType(String type) and so on~

##TODO

  • session/cookie support
  • make network imageload smoothly as Picasso

exvolley's People

Contributors

hackforid avatar

Watchers

WangLin avatar

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.