Class ServerConnector
A FHIR server connector.
Inheritance
Namespace: Microsoft.Health.Fhir.SpecManager.Manager
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public static class ServerConnector : object
Methods
| Improve this Doc View SourceParseCapabilityJson(String, String)
Parse capability JSON.
Declaration
public static FhirCapabiltyStatement ParseCapabilityJson(string json, string smartConfigJson = "")
Parameters
Type | Name | Description |
---|---|---|
System. |
json | [out] The JSON. |
System. |
smartConfigJson | The smart configuration JSON. |
Returns
Type | Description |
---|---|
Fhir |
A FhirCapabiltyStatement. |
TryDownloadResource(String, out String)
Attempt to download an instance from the specified FULL url.
Declaration
public static bool TryDownloadResource(string instanceUrl, out string fhirJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
instanceUrl | Full URL for the instance content. |
System. |
fhirJson | Downloaded JSON or null if download fails. |
Returns
Type | Description |
---|---|
System. |
TryGetServerInfo(String, Boolean, Dictionary<String, IEnumerable<String>>, out FhirCapabiltyStatement)
Attempts to get server information a FhirServerInfo from the given string.
Declaration
public static bool TryGetServerInfo(string serverUrl, bool resolveExternal, Dictionary<string, IEnumerable<string>> headers, out FhirCapabiltyStatement serverInfo)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverUrl | URL of the server. |
System. |
resolveExternal | True to resolve external references. |
Dictionary<System. |
headers | The headers. |
Fhir |
serverInfo | [out] Information describing the server. |
Returns
Type | Description |
---|---|
System. |
True if it succeeds, false if it fails. |
TryGetServerInfo(String, Boolean, Dictionary<String, IEnumerable<String>>, out String, out FhirCapabiltyStatement)
Attempts to get server information a FhirServerInfo from the given string.
Declaration
public static bool TryGetServerInfo(string serverUrl, bool resolveExternal, Dictionary<string, IEnumerable<string>> headers, out string json, out FhirCapabiltyStatement serverInfo)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverUrl | URL of the server. |
System. |
resolveExternal | True to resolve external references. |
Dictionary<System. |
headers | The headers. |
System. |
json | [out] The JSON. |
Fhir |
serverInfo | [out] Information describing the server. |
Returns
Type | Description |
---|---|
System. |
True if it succeeds, false if it fails. |
TrySearchForCanonical(String, String, String, out String)
Attempts to search for canonical.
Declaration
public static bool TrySearchForCanonical(string serverUrl, string resourceType, string canonicalUrl, out string fhirJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverUrl | |
System. |
resourceType | Type of the resource. |
System. |
canonicalUrl | URL of the canonical. |
System. |
fhirJson | [out] Downloaded JSON or null if download fails. |
Returns
Type | Description |
---|---|
System. |
True if it succeeds, false if it fails. |