anchor.diff:    LReaderRttiType: TRttiType;
   
     LReaderMediaTypes: TMediaTypeList;
  -  LMethodConsumesMediaTypes: TMediaTypeList;
  +  LConsumesMediaTypes: TMediaTypeList;
     LAllowedMediaTypes: TArray<string>;
     LMediaTypes: TArray<string>;
     LMediaType: string;
     LCandidateMediaType: string;
  +  LAttributes: TArray<TCustomAttribute>;
   //  LCandidateQualityFactor: Double;
   begin
  -  Assert(Assigned(ADestination));
  -  LMethod := ADestination.Parent as TRttiMethod;
  -  Assert(Assigned(LMethod));
  -
     AMediaType := nil;
     AReader := nil;
     LFound := False;
     LCandidateAffinity := -1;
     LCandidateMediaType := '';
   //  LCandidateQualityFactor := -1;
  -
  -  // consider method's Consumes
  -  LMethodConsumesMediaTypes := GetConsumesMediaTypes(LMethod);
  +  LMethod := nil;
  +
  +  Assert(Assigned(ADestination));
  +  if ADestination.Parent is TRttiMethod then
  +  begin
  +    LMethod := ADestination.Parent as TRttiMethod;
  +    LConsumesMediaTypes := GetConsumesMediaTypes(LMethod);
  +    LAttributes := LMethod.GetAttributes;
  +  end
  +  else begin
  +    LConsumesMediaTypes := GetConsumesMediaTypes(ADestination);
  +    LAttributes := ADestination.GetAttributes;
  +  end;
  +
     try
  -    if LMethodConsumesMediaTypes.Count > 0 then
  -      LAllowedMediaTypes := LMethodConsumesMediaTypes.ToArrayOfString
  +    if LConsumesMediaTypes.Count > 0 then
  +      LAllowedMediaTypes := LConsumesMediaTypes.ToArrayOfString
       else
   {$ifdef DelphiXE7_UP}
         LAllowedMediaTypes := [];
  
positive.code:           else
              LMediaTypes := TMediaTypeList.Intersect(LAllowedMediaTypes, LReaderMediaTypes);
            for LMediaType in LMediaTypes do
              if LReaderEntry.IsReadable(ADestination.GetRttiType, LMethod.GetAttributes, LMediaType) then
              begin
                if not LFound
                   or (
                     (LCandidateAffinity < LReaderEntry.GetAffinity(ADestination.GetRttiType, LMethod.GetAttributes, LMediaType))
  //                   or (LCandidateQualityFactor < LAcceptMediaTypes.GetQualityFactor(LMediaType))
                   )
                then
                begin
                  LCandidate := LReaderEntry;
                  LCandidateAffinity := LCandidate.GetAffinity(ADestination.GetRttiType, LMethod.GetAttributes, LMediaType);
                  LCandidateMediaType := LMediaType;
  //                LCandidateQualityFactor := 1;
                  LFound := True;
  
negative.code:         AMediaType := TMediaType.Create(LCandidateMediaType);
        end;
    finally
      LConsumesMediaTypes.Free;
    end;
  end;
  
  