Edit

Share via


ISPHttpClientCommonConfiguration interface

Flags interface for SPHttpClientCommonConfiguration

Extends

Properties

jsonRequest

Automatically configure the "Content-Type" header for a JSON payload.

jsonResponse

Automatically configure the "Accept" header for a JSON payload.

usePopupForCookieRefresh

Handle cookie refresh with a popup dialog

Property Details

jsonRequest

Automatically configure the "Content-Type" header for a JSON payload.

jsonRequest?: boolean;

Property Value

boolean

Remarks

When this switch is true:

If the "Content-Type" header was not explicitly added for the request, then SPHttpClient will add it if the request is a write operation (i.e. an HTTP method other than "GET", "HEAD", or "OPTIONS").

For OData 3.0, the value is 'application/json;odata=verbose;charset=utf-8'.

For OData 4.0, the value is 'application/json;charset=utf-8'.

jsonResponse

Automatically configure the "Accept" header for a JSON payload.

jsonResponse?: boolean;

Property Value

boolean

Remarks

When this switch is true:

If the "Accept" header was not explicitly added for the request, then SPHttpClient will add it.

For OData 3.0, the value is 'application/json'.

For OData 4.0, the value is 'application/json;odata.metadata=minimal'.

usePopupForCookieRefresh

Handle cookie refresh with a popup dialog

usePopupForCookieRefresh?: boolean;

Property Value

boolean

Remarks

When this switch is true popup auth will be used for handling a cookie refresh. This means the caller must handle the popup events. If it is undefined or false full page redirect will be defaulted to.