Skip to main content

core.medplumclient.get

Home > @medplum/core > MedplumClient > get

MedplumClient.get() method

Makes an HTTP GET request to the specified URL.

This is a lower level method for custom requests. For common operations, we recommend using higher level methods such as readResource(), search(), etc.

Signature:

get<T = any>(url: URL | string, options?: MedplumRequestOptions): ReadablePromise<T>;

Parameters

ParameterTypeDescription
urlURL | stringThe target URL.
optionsMedplumRequestOptions(Optional) Optional fetch options.

Returns:

ReadablePromise<T>

Promise to the response content.