• Ben Burhans
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

While running the curl examples for bulk api. I'm hitting an enfuriating circular pattern of errors. If I run this (with serverUrl and sessionId properly populated:

curl <serverUrl> -H "X-SFDC-Session: <sessionId>" -H "Content-Type: application/xml; charset=UTF-8" -H "Accept: application/xml" -H"Host: test.salesforce.com" -H "Connection: keep-alive" -d create-job.xml

I get this:
<faultstring>content-type of the request should be text/xml</faultstring>

If I run this:
curl <serverUrl> -H "X-SFDC-Session: <sessionId>" -H "Content-Type: text/xml; charset=UTF-8" -H "Accept: application/xml" -H"Host: test.salesforce.com" -H "Connection: keep-alive" -d create-job.xml

I get this:
<faultstring>SOAPAction HTTP header missing</faultstring>

What am I missing here?

  • March 25, 2015
  • Like
  • 0