Name

NetConnection.RequestPersistentHeader( ) Method

Synopsis

                     myNetConnectionObject.RequestPersistentHeader(name, object)

Arguments

name

An arbitrary header name that can be recognized by the server.

object

Any ActionScript object that becomes the header named in the addHeader( ) call.

Description

RequestPersistentHeader( ) is a method that can be initiated by the server-side gateway to tell the Flash client to add a header to the request packets. It is equivalent to calling the addHeader( ) method, but it can be triggered by the server-side gateway. It is useful when the server application desires that a specific header, such as a session ID, be attached to every AMF packet sent from the client to the server.

After the server invokes RequestPersistentHeader( ), each subsequent AMF packet from the client on the relevant connection will contain the specified header information. AMF packets returned from the server do not include this header, unless your server-side code manually adds it to the return packet.

Usage

You should not use this method directly, because it is reserved for future use by the gateway.

See Also

NetConnection.addHeader( ), NetConnection.setCredentials( ); Chapter 4

Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.