Fast Request
Get start
Features
What's New
Script
🔥 Teamwork
Contact us
🎯 Faq
  • Introduction
  • Install
    • Make icon move
    • Project-level domain config
    • Project-level config
    • SearchEveryWhere
    • API group
    • Debug API & send request
    • Download file
    • Stop API request
    • Navigate to current method
    • Save request
    • Temporary request
    • Apifox integration
    • Postman Sync
    • Re generate
    • cURL import
    • cURL copy
    • Single url copy
    • API document sync
    • History request
    • Setting manager
    • Full screen
    • Annual report
    • Document / Contact
    • Html preview
    • Swagger default value
    • Auto Description
    • API list
    • APIs export to Postman
    • APIs import and export
    • Batch export API doc
    • API navigate tree
    • API list preview
    • Api comment preview
    • Script
    • Function
    • Quickly add header
    • Auto domain
    • AI
    • Headers group
    • Headers batch edit
    • Custom toolbar
    • Json grammar check
  • Script
  • Environment
  • What's New
  • Teamwork
  • Buy Plugin
  • Version compare
  • Contacts
  • FAQ
  • Price adjust
  • EULA
  • History changes
  • Features

Function


Function

Item 1 of 3

Path:Project Global Config -> Functions

Use {{$functionName}} to replace the fixed value. Methods must be paramaterless, otherwise it won't work.

Pressing the shortcut key after typing {{$, it will invoke the auto-completion action.

Developers can use the built-in api in the JDK to write own custom functions, such as 5-length random strings.

public String randomString() {
    StringBuilder sb = new StringBuilder(5);
    for (int i = 0; i < 5; i++) {
        int randomIndex = RANDOM.nextInt(CHAR_NORMAL.length());
        sb.append(CHAR_NORMAL.charAt(randomIndex));
    }
    return sb.toString();
}

Also you can use java-faker library to customize various types of random parameters.

How to set Code completion shortcut

Under Setting -> Keymap ====> Main Menu->Code->Code Completion->Basic

Last update: 3/7/2025, 8:07:57 AM
Prev
Script
Next
Quickly add header
Theme by vuepress-theme-hope
Copyright © 2021-present Kings