auth::sync::get_doc::http::GetDocument (private)

 auth::sync::get_doc::http::GetDocument parameters

Defined in packages/acs-authentication/tcl/sync-procs.tcl

Retrieve the document by HTTP

Parameters:
parameters (required)

Testcases:
sync_http_get_document
Source code:
    array set result {
        doc_status failed_to_conntect
        doc_message {}
        document {}
        snapshot_p f
    }

    array set param $parameters

    if { ($param(SnapshotURL) ne "" && [clock format [clock seconds] -format "%d"] eq "01")
         || $param(IncrementalURL) eq ""
     } {
        # On the first day of the month, we get a snapshot
        set url $param(SnapshotURL)
        set result(snapshot_p) "t"
    } else {
        # All the other days of the month, we get the incremental
        set url $param(IncrementalURL)
    }

    if { $url eq "" } {
        error "You must specify at least one URL to get."
    }

    set dict [util::http::get -url $url]
    set result(document) [dict get $dict page]

    set result(doc_status) "ok"

    return [array get result]
Generic XQL file:
packages/acs-authentication/tcl/sync-procs.xql

PostgreSQL XQL file:
packages/acs-authentication/tcl/sync-procs-postgresql.xql

Oracle XQL file:
packages/acs-authentication/tcl/sync-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: