cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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.
Highlighted
Frequent Visitor

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

Highlighted
Frequent Visitor

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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (5,966)