Wget command as HTTP Request

Hi

I need to send a XML file to a service. According to their documentation it should work with the following wget command:

wget "exampledomain.com:8000" --post-file="xyz.xml" --header="Content-Type:text/xml"

In Integromat I used the following HTTP Request:

Apparently the receiver is getting only an empty request. Does someone have an idea what the problem could be? Is my http request wrong?

Thanks for the help!

Please provide the XML you are trying to send. With XML you need to make sure this is formatted correctly otherwise it won’t work.
You can check in the console of google chrome, what exactly is being send. This way you can debug it.

Cheers!

1 Like

Hi Bjorn, thanks for your help.

The XML should be OK, it looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orders>
  <order>
    <increment_id>4465585782936</increment_id>
    <kdnr>77673623412</kdnr>
    <shc_satzart>XML</shc_satzart>
    <shc_mandant>1</shc_mandant>
    <shipping>
      <firstname>Customer</firstname>
      <lastname>Tester</lastname>
      <street>Teststreet 10</street>
      <city>New York</city>
      <postcode>20000</postcode>
    </shipping>
    <payment>
      <shc_auftragsart>N0</shc_auftragsart>
    </payment>
    <items>
      <item>
        <shc_nummer>547768</shc_nummer>
        <qty_ordered>1</qty_ordered>
      </item>
    </items>
  </order>
</orders>

I would check with chrome developer console, but the node suddenly stopped working because of lack of permission in the Make Shopify App. Im not sure whats happening.

There’s a great tool called https://webhook.site that you can send this request to in lieu of your intended destination to see what Make is sending out the door. You can confirm the payload is correct, or what error you see for yourself at that point. Go to the site and it gives you a unique URL you can use for sending requests for free. It’s super handy for diagnosing issues like this. (We use it often when debugging nocode problems in the statechange community)

2 Likes

Thanks for the recommendation. I sent the request with integromat and with wget to the site and for me it looks the same:

Integromat:

wget:

I dont know if they are maybe expecting a multipart/form-data request, but then I dont get why they would tell me to send them the files with the mentioned wget command.

I see integromat adding a query string that the weget does not have - maybe try removing that?