Git Product home page Git Product logo

webi's People

Contributors

alirezaashrafi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

webi's Issues

Webi duplicating requests

The problem is two-fold. Webi sending duplicate requests behind the scene, and duplicated post data.

  1. Duplicated requests - Code as follows:

Webi.with(this)
.from(someURL)
.addPost("user", user)
.addPost("code", code)
.addPost("values", values)
.onResponse(new OnResponse() {
@OverRide
public void Response(String response, String where) {}
})
.setOnFailed(new OnFailed() {
@OverRide
public void failed(int code) {}
})
.setRetryTimes(0)
.connect();

LogCat shows that this function is called once, and success also reported once, but on server side, I see duplicated entries:

x.x.x.x - - [08/Mar/2018:07:30:15 +0000] "POST /xxx.php HTTP/1.1" 200 379 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Redmi Note 4 MIUI/V9.2.2.0.MBFMIEK)"
x.x.x.x - - [08/Mar/2018:07:30:15 +0000] "POST /xxx.php HTTP/1.1" 200 365 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Redmi Note 4 MIUI/V9.2.2.0.MBFMIEK)"

Notice the requests are sent basically at the same time, with a slightly different payload.

  1. Post data duplication.

Logcat as follows:

com.ashrafi.webi.classes.PostDataBuilder: buildPostData: user=AAAA&code=BBBB&user=AAAA&code=BBBB&values=%5B%5B1520493226272%2C0%2C3.519%2C22.2803964%2C114.188337%2C0%2C0.0%5D%2C%5B1520493234846%2C0%2C0.086%2C22.2803964%2C114.188337%2C0%2C0.0%5D%5D

You can see in this example that user and code are duplicated. In other samples I also see "values" re-appearing (I did not check if the data is the same - too long).

Parameters becoming array

Good work done. The only issue i am facing is parameters become array when request are made twice or more.

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.