| | |
| | | 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 ); |
| | | } |
| | | *] |
| | | } |