[squeak-dev] Re: SOAP package (was Re: HTTPSocket instance side)
Andreas Raab
andreas.raab at gmx.de
Mon Dec 20 22:12:15 UTC 2010
On 12/20/2010 10:46 AM, Matthew Fulmer wrote:
> I considered making it use WebClient rather than HTTPSocket, but
> didn't want to introduce a new dependency to a package I don't own. it
> may be necessary, however; the 3.10 and 4.1 HTTPSocket classes are
> entirely incompatable if you need to define your own http headers
> (which Soap does)
Adding additional headers should be trivial, like here:
HTTPSocket
httpGetDocument: 'http://www.google.com'
args: 'q=squeak'
accept: '*'
request: 'X-My-Header: foobar', String crlf,
'X-Your-Header: anotherone'.
The #request: argument takes an arbitrary string that's added to the
request header[*]. Ditto for #httpPost:content:type:accept:request:.
[*] Yes, the argument is badly named. It should be called #headers:.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|