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

Added Support for Automatic Retry #2337

Closed
wants to merge 15 commits into from
Closed

Conversation

dalwadi2
Copy link

Create RetryHelper Functionality for poor network APIs which gives different error code due to network fluctuation.

dalwadi2 added 2 commits May 18, 2017 14:07
…fferent error code due to network fluctuation.
…fferent error code due to network fluctuation.
@dodgex
Copy link

dodgex commented May 18, 2017

You are using package harsh.dalwadi.retrofitretryhelper; in most of your files. ;)

@PromanSEW
Copy link
Contributor

PromanSEW commented May 18, 2017

Please add copyright headers in all files and fix package names
P.S. Travis show errors that you are using wrong indentation in code. Please reformat it according to Square coding style

@dalwadi2
Copy link
Author

@dodgex I will correct that one.
@PromanSEW I don't know about Travis very well

@dalwadi2
Copy link
Author

@PromanSEW can you guide me with that?

@PromanSEW
Copy link
Contributor

PromanSEW commented May 18, 2017

@dalwadi2 you can remove imports because it is the same package
See https://travis-ci.org/square/retrofit/builds/233555375#L272-L334 and look at existing code in repository for understanding code style

@@ -0,0 +1,89 @@
/*
* Copyright (C) 2012 Square, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is 2017 now

@dalwadi2
Copy link
Author

@PromanSEW solved.
any other suggestion?
or in which file I have to change now?

@dalwadi2
Copy link
Author

Still, Travis checks failed.
@PromanSEW can you suggest me what do I have to change?

@@ -0,0 +1,15 @@
package retrofit2;

import Call;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These "imports" are unnecessary and break build. Same for other files. Please remove them

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@PromanSEW
Copy link
Contributor

Also you forgot copyright headers

@dalwadi2
Copy link
Author

@PromanSEW
what about copyright headers? can you explain to me what to do?

@PromanSEW
Copy link
Contributor

@dalwadi2
Copy link
Author

@PromanSEW thanks for your Support

Copy link
Collaborator

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think Retrofit is the right layer for this behavior. Instead, doing it as an OkHttp interceptor allows finer control of the connection configuration etc.

@JakeWharton JakeWharton closed this Jun 5, 2017
@dalwadi2
Copy link
Author

dalwadi2 commented Jun 7, 2017

@JakeWharton can you please tell me the reason for closing this? or any Suggestion that how I make better this functionality?
Thanks.

@JakeWharton
Copy link
Collaborator

I echo Jesse's comments. See also #2180 (comment).

@dalwadi2
Copy link
Author

dalwadi2 commented Jun 7, 2017

Okay, thanks.

@WingSafari5
Copy link

Is this (or similar) behaviour available in OkHTTP?
Also I think Square and their people are doing a grea job at providing high-quality librarys for the android ecosystem.
Android just wouldn't be the same w/o you!

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

Successfully merging this pull request may close these issues.

6 participants