OkHttpParamsGet

Additional

Language
Java
Version
v2.0.1 (Dec 17, 2019)
Created
Mar 7, 2017
Updated
May 28, 2023
Owner
kingwang666
Contributor
kingwang666
1
Activity
Badge
Generate
Download
Source code

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

  1. Map<String, String>
  2. Map<String, Object>
  3. Map<String, RequestBody>
  4. List<MultipartBody.Part>
  5. MultipartBody.Builder

How to use

  1. Choose a class.
  2. Press Alt + P or click the Generate menu choose GetParams.
  3. Choose a type.
  4. 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):
    1. fixed crash bug
  • 2.2.0(2023-05-04):
    1. target to 2023.1.1
    2. update jdk to 17
  • 2.1.3(2023-05-03):
    1. Exclude static field
    2. Fixed bugs
  • 2.1.2(2020-08-31):
    1. Support implements interface
    2. Fix use open fun in final class
  • 2.1.1(2020-04-30):
    1. Change since-build to 182
  • 2.1.0(2020-04-29):
    1. Support OkHttp4.x
  • 2.0.1(2019-12-17):
    1. Fix not auto import when fields is empty
  • 2.0.0(2019-12-13):
    1. Replaced @PostFiles by @PostFile. OkHttpParamsGet can identify the type of request, supporting list,array and map
    2. Add @ParamName. Support custom param name
    3. Now @PostFile support java.io.File. And support custom key
    4. Settings added the switch between HashMap and ArrayMap
  • 1.5.3(2019-10-23):
    1. set default annotation when the value is no nullable and nonnull
  • 1.5.2(2019-06-24):
    1. Replace HashMap with ArrayMap
  • 1.5.1(2019-03-30):
    1. Fix array to string bug. Now user Arrays.toString()
  • 1.5.0(2019-03-02):
    1. Support Kotlin.
    2. Support null check. When the value is null, you can either add or add as an empty string.
    3. Support Map<String, Object>
    4. 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.
    5. add annotations:
      1. @Key: post file key.
      2. @Filename: post file filename.
      3. @MimeType: post file mime-type.
      4. @Data: post file data.
  • 1.4.0(2017-08-17):
    1. Auto import class.
  • 1.3.0(2017-06-15):
    1. Update the params name.
    2. 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):
    1. Update Id.
    2. Fix keyboard shortcut cannot use.
    3. Fix annotations useless bug.
    4. Fix a AnActionEvents bug. This is because IntelliJ API doesn't allow sharing AnActionEvents between swing events.
  • 1.1.0(2017-03-08):
    1. Optimized the code display
  • 1.0(2017-03-08):
    1. add annotations:
      1. @Ignore: dont add to params
      2. @PostFile: post a file
      3. @PostFiles: post files
    2. FileInput: upload File class

url

OkHttpParamsGet