Sending request in XML

Hi with the ApifySDK we could export json dataset to xml format like shown with the following format :
javascript {
"address": [{
"@": {
"type": "home",
},
"street": "21st",
"city": "Chicago",
},
{
"@": {
"type": "office",
},
"#": "unknown",
}]
}
javascript {
"address": [{
"@": {
"type": "home",
},
"street": "21st",
"city": "Chicago",
},
{
"@": {
"type": "office",
},
"#": "unknown",
}]
}
Is it possible to use the same format with crawlee to send HTTP request in XML body?
2 Replies
afraid-scarlet
afraid-scarlet3y ago
request.payload can be any formatted string, but I guess you will need to add relevant headers, also only use case I can imagine is some third party API, so check original headers as you see in browser
rival-black
rival-blackOP3y ago
Thanks @Alexey Udovydchenko I just realized XML format used between `` is working in request payload to a third party API.

Did you find this page helpful?