none
Web Http Adapter - Suppress Optional Query Parameters(Send Port) RRS feed

  • Question

  • Team,

    Already checked a few posts but not clear about the following.

    http://baseurl/{mandatoryparam1}/v1?location={optionalparam1}

    Is there a in-built way to suppress the "?location={optionalparam1}" part when the optionalparam1 property is not passed through? Custom code is the only option?

    Thanks


    Sriram N http://srirambiztalks.wordpress.com/

    Tuesday, January 7, 2020 1:54 PM

Answers

  • Yes, use the HTTP Method and URL Mapping and set the Operation appropriate either in an Orchestration or elsewhere.

    e.g.

    <BtsHttpUrlMapping>
              <Operation Name='RetrieveWithParam' Method = 'GET' Url='{mandatoryparam1}/v1?location={optionalparam1}' />
              <Operation Name='RetrieveWithoutParam' Method = 'GET' Url='{mandatoryparam1}/v1' />
    </BtsHttpUrlMapping>


    Tuesday, January 7, 2020 8:18 PM

All replies

  • Yes, use the HTTP Method and URL Mapping and set the Operation appropriate either in an Orchestration or elsewhere.

    e.g.

    <BtsHttpUrlMapping>
              <Operation Name='RetrieveWithParam' Method = 'GET' Url='{mandatoryparam1}/v1?location={optionalparam1}' />
              <Operation Name='RetrieveWithoutParam' Method = 'GET' Url='{mandatoryparam1}/v1' />
    </BtsHttpUrlMapping>


    Tuesday, January 7, 2020 8:18 PM
  • Thanks Colin, will do a custom implementation.

    Sriram N http://srirambiztalks.wordpress.com/

    Wednesday, January 8, 2020 1:22 PM