Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: AddPostKey - nhttppostmode = 4 ???

$
0
0
Re: AddPostKey - nhttppostmode = 4 ???
Web Connection 5.0
Re: AddPostKey - nhttppostmode = 4 ???
Feb. 5, 2013
09:31 am
3PJ0KEDX3Show this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:MB
Use nHttpPostMode=4 (or really anything other than 1 or 2) for anything you don't want to have encoded. Then set cContentType to whatever you want after setting nHttpPostMode...

There are three options:

1 - UrlEncoded
2 - Multi-Part form encoded
4 - No encoding
anything else - no encoding

where the last two options are pretty much the same except that nHttpPostMode = 4 sets the content type to text/xml.

Additionally, only modes 1 and 2 make sense with keys. For anything else you're posting raw POST buffers so there's no key and that code never is run.

+++ Rick ---



Rick,

In the doc's you reference mode 4 but in the case statement there are only two possible routes. If you use mode 4 the postbuffer is empty (maybe you intended this).

Furthermore, the default is nhttppostmode = 1 which will urlencode strings (no matter what). The receiver of the post may not like this though and in my case is breaking an integration with SKIPJACK for cc processing in their 'advanced processor' mode (annoying).

So, my question is should I subclass addpostkey or should you be adding a new case like this?

CASETHIS.nhttppostmode = 4THIS.cPostBuffer = this.cPostBuffer + IIF(!EMPTY(this.cPostBuffer),"&","") + ; tcKey +"="+ tcValue



Rick Strahl
West Wind Technologies


from Lago de Garda, Italy

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles