copy activity additional headers issue RRS feed

  • Question

  • I am passing below 

    @{concat('{','Content-Length: 0
    Content-Type: application/x-www-form-urlencoded ','}')} as additional headers in copy activity to call http rest api post method,

    but getting issue 

    { "errorCode": "2200", "message": "Failure happened on 'Sink' side. ErrorCode=UserErrorInvalidHttpRequestHeaderFormat,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to set addtional http header,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.ArgumentException,Message=Specified value has invalid HTTP Header characters.\r\nParameter name: name,Source=System,'", "failureType": "UserError", "target": "CopyPM3Data", "details": [] }

    any help would be appreciated.

    Friday, May 29, 2020 10:24 AM

All replies

  • Hi Pooja,

    According to the error message, the problem lies on the requestHeader setting. Please note that the format of the requestHeader in REST dataset should be like "key1:value1\nkey2:value2\nkey3:value3", so in your case, pass "Content-Type": "application/x-www-form-urlencoded" to requestHeader should be the right format.

    Hope this helps.

    Ref - https://stackoverflow.com/a/53164564/10653466

    Friday, May 29, 2020 11:17 AM
  • Hi,

    as you mentioned 

     Please note that the format of the requestHeader in HTTP dataset should be like "key1:value1\nkey2:value2\nkey3:value3"

    but i think microsoft did'nt provide any option to set header values in http data set.

    I found this option as additional headers in copy activity i also used this format "key1:value1\nkey2:value2\nkey3:value3" but no luck.


    Friday, May 29, 2020 12:31 PM
  • Hi Pooja,

    Sorry for the delayed response. It's REST dataset that I was talking about. Sorry for the confusion. I have edited my previous response.

    Monday, June 8, 2020 4:52 AM