-1

Below is the example code get from LazadaOP:

Create function in ProductsController:

Continue...

So I just try to run this but it shows the error with invalid request format.

Error Page

I just want to know what is the problem with the code, and if there some solution plz do provide some code to references.TQ

Community
  • 1
  • 1
WilliamC
  • 5
  • 2
  • 1
    Please put code into the Q, not as pic, and especially not as link to external pic :) – zabop Mar 23 '20 at 12:28

1 Answers1

0

@WilliamC, you had used a single quote on your XML string, yet your double quotes inside the string are escaped (e.g. '<xml version=\"1.0\"...'). You don't have to escape double quotes inside a single quoted string.

Should have been: '<xml version="1.0" encoding="UTF-8" ?>...'

More explanation about single vs. double quotes can be found here.

ubuntux
  • 394
  • 3
  • 12