OkHttpParamsGet
中文
Help you to get Okhttp request params. Support Kotlin.
This is IntelliJ IDEA and Android Studio plugins. If you need gradle plugins please click.
How to install
File->Settings->Browse Repositories->OkHttpParamsGet
Support
- Map<String, String>
- Map<String, Object>
- Map<String, RequestBody>
- List<MultipartBody.Part>
- MultipartBody.Builder
How to use
- Choose a class.
- Press Alt + P or click the Generate menu choose GetParams.
- Choose a type.
- click ok.
ps
- @Ignore: dont add to params
- @PostFile: post file. Support single, list, array and map
- @ParamName: custom param name
@PostFiles: post files.Removed use @PostFile- @Key: post file key
- @Filename: post file filename
- @MimeType: post file mime-type
- @Data: post file data.
These annotations can be in any package
update
- 2.2.1(2023-05-28):
- fixed crash bug
- 2.2.0(2023-05-04):
- target to 2023.1.1
- update jdk to 17
- 2.1.3(2023-05-03):
- Exclude static field
- Fixed bugs
- 2.1.2(2020-08-31):
- Support implements interface
- Fix use open fun in final class
- 2.1.1(2020-04-30):
- Change since-build to 182
- 2.1.0(2020-04-29):
- Support OkHttp4.x
- 2.0.1(2019-12-17):
- Fix not auto import when fields is empty
- 2.0.0(2019-12-13):
- Replaced @PostFiles by @PostFile. OkHttpParamsGet can identify the type of request, supporting list,array and map
- Add @ParamName. Support custom param name
- Now @PostFile support java.io.File. And support custom key
- Settings added the switch between HashMap and ArrayMap
- 1.5.3(2019-10-23):
- set default annotation when the value is no nullable and nonnull
- 1.5.2(2019-06-24):
- Replace HashMap with ArrayMap
- 1.5.1(2019-03-30):
- Fix array to string bug. Now user Arrays.toString()
- 1.5.0(2019-03-02):
- Support Kotlin.
- Support null check. When the value is null, you can either add or add as an empty string.
- Support Map<String, Object>
- You can customize the class that uploads the file. You can use annotations on the property or method to identify the key filename of the uploaded file mime-type and data.
- add annotations:
- @Key: post file key.
- @Filename: post file filename.
- @MimeType: post file mime-type.
- @Data: post file data.
- 1.4.0(2017-08-17):
- Auto import class.
- 1.3.0(2017-06-15):
- Update the params name.
- Add get body. This type is return MultipartBody.Builder. You can build a RequestBody and set upload progress listener.
- 1.2.0(2017-03-09):
- Update Id.
- Fix keyboard shortcut cannot use.
- Fix annotations useless bug.
- Fix a AnActionEvents bug. This is because IntelliJ API doesn't allow sharing AnActionEvents between swing events.
- 1.1.0(2017-03-08):
- Optimized the code display
- 1.0(2017-03-08):
- add annotations:
- @Ignore: dont add to params
- @PostFile: post a file
- @PostFiles: post files
- FileInput: upload File class
- add annotations: