// RequestStat contacts the XMiDT cluster for device statistics.
RequestStat contacts the XMiDT cluster for device statistics.
// RequestStat contacts the XMiDT cluster for device statistics .
func (s *service) RequestStat(ctx context.Context, authHeaderValue, deviceID string) (*transaction.XmidtResponse, error) {
	r, err := http.NewRequestWithContext(ctx, http.MethodGet, strings.Replace(s.xmidtStatURL, "${device}", deviceID, 1), nil)
	if err != nil {
		return nil, err
	}
	if s.authAcquirer != nil {
		authHeaderValue, err = s.authAcquirer.Acquire()
		if err != nil {
			return nil, err
		}
	}
	r.Header.Set("Authorization", authHeaderValue)
	return s.transactor.Transact(r)
}
func ( s * service ) RequestStat ( ctx context . Context , authHeaderValue , deviceID string ) ( * transaction . XmidtResponse , error ) { r , err := http . NewRequestWithContext ( ctx , http . MethodGet , strings . Replace ( s . xmidtStatURL , " " , deviceID , 1 ) , nil ) if err != nil { return nil , err } if s . authAcquirer != nil { authHeaderValue , err = s . authAcquirer . Acquire ( ) if err != nil { return nil , err } } r . Header . Set ( " " , authHeaderValue ) return s . transactor . Transact ( r ) }
RequestStat contacts the XMiDT cluster for device statistics.
RequestStat contacts the XMiDT cluster for device statistics .