-
-
Notifications
You must be signed in to change notification settings - Fork 735
Add configurable serverURL to Parse.Configuration. #330
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
Conversation
By analyzing the blame information on this pull request, we identified @grantland, @richardjrossiii and @wangmengyan95 to be potential reviewers. |
@@ -8,6 +8,8 @@ | |||
*/ | |||
package com.parse; | |||
|
|||
import android.net.Uri; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use java.net.URL
instead
Updated PR. Take another look 😄 |
@richardjrossiii updated the pull request. |
@@ -63,7 +63,7 @@ | |||
for (ParseRESTObjectCommand command : commands) { | |||
JSONObject requestParameters = new JSONObject(); | |||
requestParameters.put("method", command.method.toString()); | |||
requestParameters.put("path", String.format("/1/%s", command.httpPath)); | |||
requestParameters.put("path", String.format("%s/%s", server.getPath(), command.httpPath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing slash issue would still appear in batch encoding, I don't have a great solution for that however, ATM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an ability to ammend path componenets to path when building a URI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this prevented in iOS? Just different internal URL logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grantland yep, simply via different url logic.
We could solve this by doing new URL(server, command.httpPath).getPath()
, though that potentially creates a lot of temporary objects in the interim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly either way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are doing this for ParseRESTCommand, though
@richardjrossiii updated the pull request. |
1 similar comment
@richardjrossiii updated the pull request. |
public Builder server(String server) { | ||
this.server = server; | ||
return this; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind updating the tests to cover this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@richardjrossiii updated the pull request. |
LGTM, squash and feel free to merge! |
Moves `server` from ParseObject to ParseRestCommand, and allows it to be changed via `Builder.server("myUrl")`.
fe0507b
to
01b0638
Compare
…serverurl Add configurable serverURL to Parse.Configuration.
@richardjrossiii updated the pull request. |
Moves
server
from ParseObject to ParseRestCommand, and allows it to bechanged via
Builder.server("myUrl")
.