cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frank37
Level: Powered On

Custom Connector: special Header 'Content-type' not sent

I've got a custom connector and one action needs a special header

"Content-Type": "application/x-www-form-urlencoded"

so I defined it:

Bildschirmfoto 2019-10-04 um 21.31.53.png

 

The test function works without error: 

Bildschirmfoto 2019-10-04 um 21.36.39.png  Bildschirmfoto 2019-10-04 um 21.36.51.png

 

problem:  

 

If I use this action i my PowerApp, the "Content-Type" is missing in the header and I get the error 415

{
  "timestamp": "2019-10-04T18:59:26.658+0000",
  "status": 415,
  "error": "Unsupported Media Type",
  "message": "Content type '' not supported",
  "path": "/auth/token"
}
 
I've testet the header-parameter with
  • visibility=internal (and "application/x-www-form-urlencoded" ist the default value)
  • Visibility=non and transfer the "application/x-www-form-urlencoded" as a parameter to the action

 

Any ideas?

Frank

1 ACCEPTED SOLUTION

Accepted Solutions
Frank37
Level: Powered On

Re: Custom Connector: special Header 'Content-type' not sent

Here is the solution from GonzaloR (worked for me 👍)

 

https://powerusers.microsoft.com/t5/General-Power-Automate/Custom-connector-action-with-x-www-form-u...

 

  1. Click "New Policy"
  2. Name your policy
  3. Select "Set HTTP header"
  4. Select the Operations (Actions) that require this header
  5. Header name: "content-type"
  6. Header Value: "application/x-www-form-urlencoded"
  7. Action if header exists: "override"
  8. Run policy on: "Request"

 

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Custom Connector: special Header 'Content-type' not sent

Hi @Frank37 ,

 

Please check if below blog could help:

https://www.engineeredcode.com/blog/powerapps-portals-support-for-x-content-type-options-http-header

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frank37
Level: Powered On

Re: Custom Connector: special Header 'Content-type' not sent

Dear Mona,

 

thanx for your reply.

But your solution belongs only to "PowerApps Portals" (the PowerApp is the host) and my PowerApp is the client (and the server supports the X-content-type option)

 

Frank

Frank37
Level: Powered On

Re: Custom Connector: special Header 'Content-type' not sent

Here is the solution from GonzaloR (worked for me 👍)

 

https://powerusers.microsoft.com/t5/General-Power-Automate/Custom-connector-action-with-x-www-form-u...

 

  1. Click "New Policy"
  2. Name your policy
  3. Select "Set HTTP header"
  4. Select the Operations (Actions) that require this header
  5. Header name: "content-type"
  6. Header Value: "application/x-www-form-urlencoded"
  7. Action if header exists: "override"
  8. Run policy on: "Request"

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Users Online
Currently online: 318 members 5,965 guests
Please welcome our newest community members: