Post parameter and get parameter

  • Last update:  2021-05-13
  • I. Description

    In JS calls FR print method, we mentioned that JS calls the FR print method to pass parameters in two ways: post passing parameters and get passing parameters. So what is the difference between these two parameter passing methods? Let's talk about it in detail below.

    Note: When the JAR package version is 2018-04-09 and above, please use the new printing method. For details, please refer to: Print Settings.

    II. Parameter transfer method

    1) Get pass parameters

    The parameter passing method of get is to splice the parameters behind the URL in the form of parameter 1=parameter value 1&parameter 2=parameter value 2 for transmission. For example, use js to call Flash to print a template and pass 2 parameters to the In the template, then the URL code for parameter printing in the get method is:

    http://localhost:8075/webroot/decision/view/report?viewlet=report.cpt&p1=a&p2=b

    The complete code for JS to call the FR print method is:

    var url="http://localhost:8075/webroot/decision/view/report?viewlet=report.cpt&p1=a&p2=b";
    var isPopUp = false;
    var config = {url : url,isPopUp : isPopUp}
    FR.doURLPDFPrint(config);

    2) Post parameter transfer

    The post parameter passing method uses the parameters as the content of the http request and sends them to the specified URL. They are not spliced in the URL. The URL is as follows:

    http://localhost:8075/webroot/decision/view/report

    The parameters will be passed in a special format, the complete code is as follows:

        var printurl="http://localhost:8075/webroot/decision/view/report";       
        var reportlets ="[{reportlet: '1.cpt', p1: 'a'}]";  
        var config = {  
                url : printurl,  
                isPopUp : false,  
                data : {  
                        reportlets: reportlets 
                    }  
        };FR.doURLPDFPrint(config);

    The parameters passed by post parameters are invisible, and the confidentiality is better.

    Note 1: Both the 10.0 designer and deployment package use openjdk, and flash printing cannot be started using openjdk, but Oracle/sun jdk can be used.

    Note 2: Flash printing is currently an obsolete technology. Many browsers will no longer support flash printing. It is recommended that customers use zero client or local printing.

    III. Length comparison

    Through the different ways of parameter passing, we can see that the length of the URL will be much longer than the post method when passing parameters through the get method. This means that the length of the parameters passed by the get is limited. If it exceeds the length limit of the URL, then Data transmission is not possible, but the post method does not have this limitation. The length of the URL is fixed, and it does not become longer with the increase of parameters.

    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy