Overview

DEPRECATED

Please note, this project is deprecated and no longer being maintained, please use official version volley.


Intro

This is an unofficial mirror (with some minor bugfix) for volley.

  • Maven Central

Gradle

compile 'com.mcxiaoke.volley:library:1.0.19'

Contacts

Projects

License

Copyright (C) 2014,2015,2016 Xiaoke Zhang
Copyright (C) 2011 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • POST params and headers not working

    POST params and headers not working

    Hi,

    I try to make a POST request with params and custom headers, but it not worked. When I try to make a GET request with my custom headers and URL params, it works.

    I use a JsonObjectRequest and I try to add my POST params in a JSONObject or in the override method getParams but none of them work.

    Can you help me? Thanks in advance.

    opened by AlexPari 10
  • java.lang.NegativeArraySizeException

    java.lang.NegativeArraySizeException

    I'm getting this error sometimes which causes my application to crash:

    java.lang.NegativeArraySizeException: -450 at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:322) at com.android.volley.toolbox.DiskBasedCache.get(DiskBasedCache.java:118) at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:100)

    opened by espiegel 10
  • OutOfMemoryError

    OutOfMemoryError

    The client the exception thrown as follows: java.lang.OutOfMemoryError at com.android.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:322) at com.android.volley.toolbox.DiskBasedCache.readString(DiskBasedCache.java:540) at com.android.volley.toolbox.DiskBasedCache.readStringStringMap(DiskBasedCache.java:562) at com.android.volley.toolbox.DiskBasedCache$CacheHeader.readHeader(DiskBasedCache.java:403) at com.android.volley.toolbox.DiskBasedCache.initialize(DiskBasedCache.java:156) at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:84)

    Request some JSON format of data only. Please help to analyze what's the problem?

    opened by wlrnet 6
  • HTTP POST being fired multiple times even with retry policy == 0

    HTTP POST being fired multiple times even with retry policy == 0

    When I need to make a POST request, I set retry policy = 0, but when the HTTP request hits the timeout, Volley sends another request (and if the timeout is hit again, it will send another one).

    Looks like someone else is seeing the same issue here: http://stackoverflow.com/questions/29034735/volley-makes-duplicate-post-call-at-timeout-mark

    I'm experiencing it with 1.0.8, 1.0.10, 1.0.15. I didn't try other releases.

    This is a major issue because POSTs are by definition not idempotent and I can't find a workaround using Volley with POSTs.

    opened by eatalien 6
  • NetworkDispatcher Thread Leak

    NetworkDispatcher Thread Leak

    When the NetworkDispatcher is interrupted while doing a request, the exception is swallowed and the thread will wait forever on the blocking queue take() method.

    opened by chris-feist 5
  • Failed to resolve: com.mcxiaoke.volley:library:1.0.18

    Failed to resolve: com.mcxiaoke.volley:library:1.0.18

    I add volley library to my project using Android Studio(gradle version: 2.4), but the gradle complains that Failed to resolve: com.mcxiaoke.volley:library:1.0.18. However I change the volley to 1.0.17, it is OK.

    opened by uuku 5
  • JsonObjectRequest will add http request Content-Type as application/json header automatic, even if I override getHeader()

    JsonObjectRequest will add http request Content-Type as application/json header automatic, even if I override getHeader()

    code here.

    @Override
    public Map<String, String> getHeaders() throws AuthFailureError {
        Map<String,String> headers = new HashMap<String, String>();
        headers.put("Content-Type","application/x-www-form-urlencoded");
        return headers;
    }
    

    there a two Content-Type header in the HTTP request, one is from getHeader(), the other one is added by Volley. decde24f-0a41-45c5-aabb-5ee92604ce30

    opened by chenghaojun 5
  • volley leak

    volley leak

    Encountered in the course of a problem version 1.0.18

    such as: new StringRequest(Request.Method.GET,url, new Response.Listener() { @Override public void onResponse(String response) {

            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
    
            }
        });
    

    I take request a tag . in fragment/activity stop ,call cancel.

    but now has leak :

    • GC ROOT thread com.android.volley.CacheDispatcher. (named 'Thread-16404')

    I thinks reference to the fragment/activity will also be removed

    opened by BelongsH 4
  • mErrorListener, mListener should be nulled whenever request is cancelled

    mErrorListener, mListener should be nulled whenever request is cancelled

    Please refer to this link: https://stackoverflow.com/questions/26599636/should-i-worry-about-memory-leaks-and-using-weakreference-with-volley-in-android#=

    opened by leo524891010 4
  • Volley can't handle

    Volley can't handle "big" json

    If you do this request with volley https://maps.googleapis.com/maps/api/directions/json?sensor=true&origin=48.8256676,2.383315000000001&destination=50.6293797,3.0570117&alternatives=true

    WIth a StringRequest or JsonRequest, a timeout occurs.

    opened by ben-j69 4
  • NullPointerException with ImageRequest

    NullPointerException with ImageRequest

    Here is my stacktrace can't reporduce it on my devices though :(

    java.lang.NullPointerException at android.graphics.Bitmap.createBitmap(Bitmap.java:622) at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:487) at com.android.volley.toolbox.ImageRequest.doParse(ImageRequest.java:169) at com.android.volley.toolbox.ImageRequest.parseNetworkResponse(ImageRequest.java:126) at com.android.volley.CacheDispatcher.run(CacheDispatcher.java:118)

    Is there a workaround or this need to be fixed in library ?

    opened by mstrengis 4
  • How to disable logging 'BasicNetwork.logSlowRequests:'?

    How to disable logging 'BasicNetwork.logSlowRequests:'?

    logging like this :D/Volley: [54973] BasicNetwork.logSlowRequests: HTTP response for request=<[ ] https://us-centra...

    How to disable it? I tried this code VolleyLog.DEBUG = false; at MyApplication.java but still showing on the logcat.

    opened by jvlichai 0
  • anonymous listener of volley-request causing memory-leak

    anonymous listener of volley-request causing memory-leak

    opened by Hardik-mehta 0
  • class RequestQueue   finish()的机制  mechnism

    class RequestQueue finish()的机制 mechnism

    void finish(Request<?> request) --> last line: mCacheQueue.addAll(waitingRequests);

    how to understand this? why we transfer all requests in waitingRequests to cacheQueue this time instead of put them to cacheQueue originally created? u know, both action can add the request to NetworkQueue if can't get desired cache;?

    opened by panq-jack 0
  • Perhaps should remove this project as deprecated

    Perhaps should remove this project as deprecated

    hi,

    I try the official volley library from Google. (version 1.0.0), still a lot of bugs not fixed.

    Even this project consider deprecated, the code is still newer then official library with lot of bugs fixed, perhaps should remove the deprecated instead :)

    opened by kiwionly 2
Owner
Hello World
Hello, World!
Hello World