windows - < was unexpected at this time. from curl command line when posting input data as an xml to rest service -


When I post a custom string as an input for the JSON REST service call it is pre-executed Is:

  curl-d "{\" as \ ": \" as \ ", \" input2 \ ": \" ad \ "}" -i -x post-h " Content-Type: Application / JS "http: //localhost/rtygies/Service1.svc/rest/receivedata1   

But when I am posting as an XML as input So this is the default error:

  curl-d "{\" input 1 \ ": \" & lt; Xml & gt; & Lt; / Xml & gt; \ ", \" Input 2 \ ": \" & lt; Xml & gt; & Lt; / Xml & gt; \ "}" -i -X ​​Post-H "Content-Type: Application / JS" http: //localhost/rtygies/Service1.svc/rest/receivedata1   

< Strong> Error: & lt; This time was unpredictable

I am using curls in windows.

Does anyone have to say how to post XML as a rescue input. In fact, I do not know what the matter is, but I get an error. Said & lt; This time is unexpected when I tried the following command (on window):

  curl -u admin: password -XPOST -H 'content-type: text / xml' - D '& lt; Namespace & gt; & Lt; Prefix & gt; NewWorkspace & lt; / Prefix & gt; & Lt; Uri & gt; Http: //geoserver.org< / Uri & gt; & Lt; / Namespace & gt; ' Http: // localhost: 8080 / geoserver / rest / namespaces   

Then I changed the single quote to double quote and it worked.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -