Where is ODataVersion.ToHeaderValue()

Traitée Where is ODataVersion.ToHeaderValue()

Alle Antworten

  • Montag, 6. August 2012 20:32
     
     Beantwortet

    And the answer is... Look at Utils.ToHeaderValue().


    Who will win The International Collegiate Programming Championships?

    • Als Antwort markiert DavidThi808 Montag, 6. August 2012 20:32
    •  
  • Mittwoch, 8. August 2012 08:39
     
     
    Great!

    Go go Doraemon!

  • Mittwoch, 8. August 2012 10:32
    Moderator
     
     

    The public method got moved before RTM. It's ODataUtils.ODataVersionToString.

    MaxDataServiceVersion (MaxDSV for short)

    If you mean the HTTP header (I assume you do)... The header is used by the client to specify the maximum version of OData it understands. It's up to the server what it will do, but it should never respond with a higher version than that.

    Most servers will try to use the version which fits into the max version, and if they can't, they will fail the request.

    It does NOT mean that V3 server will not response to a request with MaxDSV set to V2. It only means that if the server would have to respond with V3 features in the payload, it would fail such a request. But if the response contains only V2 features, it should reply with a V2 response.

    All clients should specify the header in all requests. So please do so :-). (It gets really tricky if the client doesn't do that and the server changes version and so on).

    Thanks,


    Vitek Karas [MSFT]