To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
HTTP + XML
The following are sample HTTP requests and responses.
The placeholders shown need to be replaced with actual values.
POST /users HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetUsers xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetUsersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PortfolioLinkApi.ServiceModel">
<Result xmlns:d2p1="http://schemas.datacontract.org/2004/07/SharedTypes">
<d2p1:CustomUserAuth>
<Address xmlns="http://schemas.servicestack.net/types">String</Address>
<Address2 xmlns="http://schemas.servicestack.net/types">String</Address2>
<BirthDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</BirthDate>
<BirthDateRaw xmlns="http://schemas.servicestack.net/types">String</BirthDateRaw>
<City xmlns="http://schemas.servicestack.net/types">String</City>
<Company xmlns="http://schemas.servicestack.net/types">String</Company>
<Country xmlns="http://schemas.servicestack.net/types">String</Country>
<CreatedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</CreatedDate>
<Culture xmlns="http://schemas.servicestack.net/types">String</Culture>
<DigestHa1Hash xmlns="http://schemas.servicestack.net/types">String</DigestHa1Hash>
<DisplayName xmlns="http://schemas.servicestack.net/types">String</DisplayName>
<Email xmlns="http://schemas.servicestack.net/types">String</Email>
<FirstName xmlns="http://schemas.servicestack.net/types">String</FirstName>
<FullName xmlns="http://schemas.servicestack.net/types">String</FullName>
<Gender xmlns="http://schemas.servicestack.net/types">String</Gender>
<Id xmlns="http://schemas.servicestack.net/types">0</Id>
<InvalidLoginAttempts xmlns="http://schemas.servicestack.net/types">0</InvalidLoginAttempts>
<Language xmlns="http://schemas.servicestack.net/types">String</Language>
<LastLoginAttempt xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</LastLoginAttempt>
<LastName xmlns="http://schemas.servicestack.net/types">String</LastName>
<LockedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</LockedDate>
<MailAddress xmlns="http://schemas.servicestack.net/types">String</MailAddress>
<Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</Meta>
<ModifiedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</ModifiedDate>
<Nickname xmlns="http://schemas.servicestack.net/types">String</Nickname>
<PasswordHash xmlns="http://schemas.servicestack.net/types">String</PasswordHash>
<Permissions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d4p1:string>String</d4p1:string>
</Permissions>
<PhoneNumber xmlns="http://schemas.servicestack.net/types">String</PhoneNumber>
<PostalCode xmlns="http://schemas.servicestack.net/types">String</PostalCode>
<PrimaryEmail xmlns="http://schemas.servicestack.net/types">String</PrimaryEmail>
<RecoveryToken xmlns="http://schemas.servicestack.net/types">String</RecoveryToken>
<RefId xmlns="http://schemas.servicestack.net/types">0</RefId>
<RefIdStr xmlns="http://schemas.servicestack.net/types">String</RefIdStr>
<Roles xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d4p1:string>String</d4p1:string>
</Roles>
<Salt xmlns="http://schemas.servicestack.net/types">String</Salt>
<State xmlns="http://schemas.servicestack.net/types">String</State>
<TimeZone xmlns="http://schemas.servicestack.net/types">String</TimeZone>
<UserName xmlns="http://schemas.servicestack.net/types">String</UserName>
<d2p1:Banned>0001-01-01T00:00:00</d2p1:Banned>
<d2p1:BannedBy>String</d2p1:BannedBy>
<d2p1:CreatedBy>String</d2p1:CreatedBy>
<d2p1:DefaultProfileUrl>String</d2p1:DefaultProfileUrl>
<d2p1:DisableEmails>0001-01-01T00:00:00</d2p1:DisableEmails>
<d2p1:IpAddress>String</d2p1:IpAddress>
<d2p1:Notes>String</d2p1:Notes>
<d2p1:PartnerId>0</d2p1:PartnerId>
<d2p1:RefSource>String</d2p1:RefSource>
<d2p1:RefUrn>String</d2p1:RefUrn>
<d2p1:Signature>String</d2p1:Signature>
<d2p1:SignatureUrl>String</d2p1:SignatureUrl>
</d2p1:CustomUserAuth>
</Result>
</GetUsersResponse>