Forum Discussion

PWTRyanWhite's avatar
PWTRyanWhite
Frequent Visitor
2 years ago
Solved

REST connector ignores any "Content-Type" header specified in additional headers when request body

When trying to use the GET method in the copy data, I need to include the Content-Type to call my endpoint, however I get this message everytime I try and use the activity.

 

I can call using web activity, because I do not receive the " REST connector ignores any "Content-Type" header specified in additional headers when request body", but not the copy data activity.

 

Any thoughts?

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi PWTRyanWhite 

     

    In the HTTP protocol, GET requests usually do not need to include the “Content-Type” header because GET requests do not carry a request body.

     

    The Content-Type header is primarily used to indicate the media type of the request body, such as in a POST or PUT request.

     

    In Microsoft Fabric, the REST connector follows this standard and therefore ignores the Content-Type header in GET requests.

     

    This is because the main purpose of a GET request is to get data from the server, not to send it, so there is no need to specify the type of the request body.

     

    If your API needs to include the Content-Type header in a GET request, you might consider using a Web activity.

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi PWTRyanWhite 

     

    In the HTTP protocol, GET requests usually do not need to include the “Content-Type” header because GET requests do not carry a request body.

     

    The Content-Type header is primarily used to indicate the media type of the request body, such as in a POST or PUT request.

     

    In Microsoft Fabric, the REST connector follows this standard and therefore ignores the Content-Type header in GET requests.

     

    This is because the main purpose of a GET request is to get data from the server, not to send it, so there is no need to specify the type of the request body.

     

    If your API needs to include the Content-Type header in a GET request, you might consider using a Web activity.

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.