-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Bring Kotlin client code up-to-speed with changes #23188
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
Changes from 2 commits
1b8cc4c
f732b71
97ddb8a
a36ac21
c8a93a5
dc45b56
b02847a
eae1eec
d798259
d24d0c4
b674d41
53460c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -63,22 +63,22 @@ import com.squareup.moshi.adapter | |||||
|
|
||||||
| {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}open class ApiClient({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val baseUrl: String, {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val client: Call.Factory = defaultClient) { | ||||||
| {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object { | ||||||
| protected const val ContentType: String = "Content-Type" | ||||||
| protected const val Accept: String = "Accept" | ||||||
| protected const val Authorization: String = "Authorization" | ||||||
| protected const val JsonMediaType: String = "application/json" | ||||||
| protected const val FormDataMediaType: String = "multipart/form-data" | ||||||
| protected const val FormUrlEncMediaType: String = "application/x-www-form-urlencoded" | ||||||
| protected const val XmlMediaType: String = "application/xml" | ||||||
| protected const val OctetMediaType: String = "application/octet-stream" | ||||||
| protected const val TextMediaType: String = "text/plain" | ||||||
| protected const val CONTENT_TYPE: String = "Content-Type" | ||||||
| protected const val ACCEPT: String = "ACCEPT" | ||||||
|
||||||
| protected const val ACCEPT: String = "ACCEPT" | |
| protected const val ACCEPT: String = "Accept" |
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.
✅
Outdated
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.
protected const val AUTHORIZATION: String = "Authorization"
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.
✅
4brunu marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
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.
@noordawod why does this one don't have a Deprecated equivalent for migration?
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.
Fixed, thanks for spotting this ✅
4brunu marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -377,11 +377,11 @@ import okhttp3.MediaType.Companion.toMediaType | |
|
|
||
| {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object { | ||
| @JvmStatic | ||
| protected val baseUrlKey: String = "{{packageName}}.baseUrl" | ||
| protected val BASE_URL_KEY: String = "{{packageName}}.baseUrl" | ||
|
||
|
|
||
| @JvmStatic | ||
| {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val defaultBasePath: String by lazy { | ||
| System.getProperties().getProperty(baseUrlKey, "{{{basePath}}}") | ||
| System.getProperties().getProperty(BASE_URL_KEY, "{{{basePath}}}") | ||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.