Поделиться через


StringHttpBody Class

Represents an HTTP body in string form used for SOAP support.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.WebTesting.StringHttpBody

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class StringHttpBody _
    Implements IHttpBody, ICloneable
[SerializableAttribute]
public class StringHttpBody : IHttpBody, 
    ICloneable
[SerializableAttribute]
public ref class StringHttpBody : IHttpBody, 
    ICloneable
[<SerializableAttribute>]
type StringHttpBody =  
    class
        interface IHttpBody
        interface ICloneable
    end
public class StringHttpBody implements IHttpBody, ICloneable

The StringHttpBody type exposes the following members.

Constructors

  Name Description
Public method StringHttpBody Initializes a new instance of the StringHttpBody class.

Top

Properties

  Name Description
Public property BodyString Gets or sets the string that contains the HTTP body contents.
Public property ContentType Gets a value representing the content-type of the body.
Public property InsertByteOrderMark

Top

Methods

  Name Description
Public method Clone Creates a shallow copy of the StringHttpBody object.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method WriteHttpBody Creates a stream that contains the HTTP body.

Top

Remarks

This is for basic SOAP support. This class is serializable. For a list of initial property values for an instance of StringHttpBody class, see the StringHttpBody constructor.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.WebTesting Namespace

Other Resources

Working with Web Tests

How to: Create a Web Service Test