lazhen
2024-05-24 8e6b4fbf0ced25ea7bed8fc8fa8364bb104d05c2
_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl
@@ -27,17 +27,25 @@
    info( json );
    
    // 调用接口
    //url := "/PR/Import";
    //i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );
    //i.URL( url );
    //i.PostMethod( true );
    //
    //try {
    //  i.Call( json );
    //
    //  htmlresult := i.Result();
    //} onerror {
    //
    //}
    url := "/PR/Import";
    i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );
    i.URL( url );
    i.PostMethod( true );
    i.MediaType( "application/json" );
    i.Call( json );
    htmlresult := i.Result();
    respJSON   := JSON::Parse( htmlresult );
    code       := respJSON.Get( "code" ).GetNumber();
    message    := respJSON.Get( "message" ).GetString();
    if ( code = 200 ) {
    } else {
      error( message );
    }
  *]
}