selectionFor()
function selectionFor(responseType, optIn?): string;
Resolve the selection set for responseType, plus any OPTIONAL_FIELDS
groups the caller opted into. Groups are additive and order-independent, so
two opt-ins on one type combine into a single selection.
Fields are deduplicated, so groups may overlap — bodyEncoding names the
body it describes, and asking for both it and body selects body once.
Parameters
| Parameter | Type | Description |
|---|---|---|
responseType | string | The response type key, eg HTTPResponse. |
optIn? | readonly string[] | Names of optional field groups to append. |
Returns
string
Was this page helpful?