Name
HttpMethodAttribute
Synopsis
This attribute is used to bind methods in an HttpGetClientProtocol or HttpPostClientProtocol proxy
class to web service methods.
The ParameterFormatter
property specifies how the proxy encodes parameters before sending them
to a web service method. The ReturnFormatter
property specifies how the proxy class decodes the web method’s return
value. Both values must be set, as there is no default value. Set ReturnFormatter
to the UrlParameterWriter
type if you are using HTTP GET or the HtmlFormParameterWriter type if
you are using HTTP POST. Always set ParameterFormatter
to the XmlReturnReader
type. An example attribute declaration for HTTP GET is <HttpMethodAttribute(GetType(XmlReturnReader), GetType(UrlParameterWriter))>.
Public NotInheritable Class HttpMethodAttribute : Inherits Attribute ' Public Constructors Public Sub New() Public Sub New(ByVal returnFormatter As Type, ByVal parameterFormatter As Type) ' Public Instance Properties Public Property ParameterFormatter As Type Public Property ReturnFormatter As Type End Class
Hierarchy
System.Object→System.Attribute→ HttpMethodAttribute
Valid On
Method
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access