{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
1
Question by JosephGalley · Apr 07, 2017 at 09:33 PM · 1k Views assign message policyassignmessageform parametersform param

Setting a FormParam overwrites all form params from request

So I have an AssignMessage policy which is supposed to set a FormParam called "From".

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="AM-Set-From">
   <DisplayName>AM - Set From</DisplayName>
      <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
      <AssignTo createNew="false" transport="http" type="request"/>
      <Set>
         <FormParams>
            <FormParam name="From"></FormParam> 
         </FormParams>
      </Set>
</AssignMessage>

The problem is that the request from the client already has 2 form parameters: "To" and "Body". But after this policy is executed in Edge, the only parameter is "From". So Edge is removing the given parameters and only keeping the one from the AssignMessage policy.

Comment
Add comment Show 1
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sudheendras ♦   · Apr 07, 2017 at 11:59 PM 0
Link

I tried to simulate this with your policy in my org... I don't see the issue (attached my proxy). It is a no-target proxy and will echo the message you send.

My sample request was -

$curl "http://MYORG-test.apigee.net/no-target-1" -d "To=destination&Body=hello" -X POST

and the proxy returns

To=destination&Body=hello&From=

no-target-1-rev2-2017-04-07.zip

no-target-1-rev2-2017-04-07.zip (2.7 kB)

Close

1 Answer

  • Sort: 
avatar image
0

Answer by Anil Sagar @ Google   · Apr 09, 2017 at 10:41 AM

@JosephGalley , Welcome to Apigee Community !

I think it's the content type header , Make sure you set the header below,

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

I can able to reproduce your issue,

With above header,

With form-data example, without above header,

Hope it helps. Keep us posted if any.


screen-shot-2017-04-09-at-40940-pm.png (153.8 kB)
screen-shot-2017-04-09-at-40958-pm.png (149.5 kB)
Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

46 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Path suffix not writing variables in new url 1 Answer

AssignMessage - How can I get all headers ? 2 Answers

Assign Message OR condition check 1 Answer

Restriction of form param count 2 Answers

How to generate XML response with the starting XML node describing version and encoding? 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges