• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Posting data to another server with CFHTTP and putting data inside the posting URL

Enthusiast ,
Oct 07, 2011 Oct 07, 2011

Copy link to clipboard

Copied

I have some code that posts data to a 3rd party server, right now I'm just testing it internally to me own mock receive script.

I use

<cfhttp url = "#GetCampaignList.camp_posting_url#" method = "post" throwonerror="yes">

and then I pass some variables using

<cfhttpparam type="URL" name="#FindFieldName.mapping_name#" value="Whatever I want in here">

All of this works, however, I changed the posting URL in the CFHTTP so that is also had some url variables in it so is ended with lets say ?testvariable=99

When I do this the testvariable seems to be appended to the first variable sent the CFHTTPPARAM and it also joins with a ?

Is it not possible to combine both or do I have to tweak something to make it happen?

Thanks

Mark

TOPICS
Advanced techniques

Views

544

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 07, 2011 Oct 07, 2011

Copy link to clipboard

Copied

I don't completely understand the question, but I recognize that url variables are generally associated with method = "get", not method = "post".  I usually try to avoid combining the two. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 07, 2011 Oct 07, 2011

Copy link to clipboard

Copied

LATEST

it looks like the CFHTTPPARAM get through fine in the above context, but any variables also added at the same time to the end of the URL as ?a=123&b=456 . these end of URL ones seem to get messed up when I tried to read all the variables, somehow it adds a ? onto the last variable. maybe the script that reads it is getting confused

I think I will just re-write it so that it just uses CFHTTPPARAM only

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation