Skip to content

XML response is not in XML format anymore #2

Open

Description

@KodeKooker

Hi,
some times ago this call was perfectly working, I used it to get the HTML body and subject of my MailUp templates. But since some months, the output is not XML anymore: now it's a simple text string and, for this reason, my XML output parsing function is not working anymore.
Below the method invocation:

$mailUp->callMethod($mailUp->getConsoleEndpoint() . "/Console/List/1/Email/1", "GET", $reqBody, "XML");

Activity

  1. scigoli commented on May 29, 2017

    @scigoli
    Contributor

    Hi @KodeKooker,
    Thank you for your message. At MailUp we are not facing many issues on XML because this format is rarely used and JSON format is widely preferred.

    When selecting XML, the PHP code sample simply injects the returned object into the web page, leading to a bad HTML formatting when XML is chosen. According to my tests, I would exclude a problem in the API (details below). In your application you are in charge to parse the returned XML data and properly extract fields' content from it.

    Hope this helps, otherwise please let me know.

    Regards,

    About API with XML responses
    I've just tested a method call like this
    curl -X GET \ https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/1/Email/1083 \ -H 'accept: application/xml' -H 'authorization: Bearer MYTOKEN -H 'cache-control: no-cache' \ -H 'content-type: application/xml'
    According to the "accept: application/xml" header, the returned response is a XML object.
    In addition, the response contains either the subject or the email content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions