logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SteamCookieRequestFactory

    Builds an HttpRequestMessage authenticated with a SteamPartnerCookies pair — the one place the Cookie header is assembled, shared by SteamPartnerClient's fetchachievements GET and SteamPushPump's push POSTs, so the two never drift into two slightly different header formats.

    Inheritance
    object
    SteamCookieRequestFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Steam.Infrastructure
    Assembly: Serenity.Steam.Infrastructure.dll
    Syntax
    public static class SteamCookieRequestFactory

    Fields

    CookieHeaderName

    The request header the session cookies travel in.

    Declaration
    public const string CookieHeaderName = "Cookie"
    Field Value
    Type Description
    string

    FormUrlEncodedMediaType

    The media type of a form-encoded request body, which the partner site's push endpoints take.

    Declaration
    public const string FormUrlEncodedMediaType = "application/x-www-form-urlencoded"
    Field Value
    Type Description
    string

    Methods

    Create(HttpMethod, string, SteamPartnerCookies)

    Builds a request with the partner site's session cookie header attached.

    Declaration
    public static HttpRequestMessage Create(HttpMethod method, string url, SteamPartnerCookies cookies)
    Parameters
    Type Name Description
    HttpMethod method

    The HTTP method to send.

    string url

    The endpoint to send it to.

    SteamPartnerCookies cookies

    The session cookies to authenticate the request with.

    Returns
    Type Description
    HttpRequestMessage

    DescribeRedirectTarget(HttpResponseMessage)

    Where a redirect response points, as host and path only — the query is deliberately dropped because a login redirect can carry state tokens that have no place in a status line or log.

    Declaration
    public static string DescribeRedirectTarget(HttpResponseMessage response)
    Parameters
    Type Name Description
    HttpResponseMessage response

    The 3xx response to describe.

    Returns
    Type Description
    string

    ResolveRedirectTarget(HttpResponseMessage)

    The absolute URL a redirect response points to, or null when it carries no location.

    Declaration
    public static Uri ResolveRedirectTarget(HttpResponseMessage response)
    Parameters
    Type Name Description
    HttpResponseMessage response

    The 3xx response to resolve.

    Returns
    Type Description
    Uri
    In this article
    © 2026 Serenity. All Rights Reserved