Skip to content

3.1 Travis Communication

Benjamin Frost edited this page Jul 25, 2021 · 2 revisions

Install Dependencies

 (Installer ss project: 'WebClient') install: 'WebClient-Core'. 
 (Installer ss) project: 'SqueakSSL'; install: 'SqueakSSL-Core'.

Sample Request

|response body|
response := WebClient new httpGet: 'https://api.travis-ci.org/repos/SWTI2014/SWTI2014-Project-05/builds' do:[:req|
    req headerAt: 'User-Agent' put: 'Squeak'.
    req addHeader: 'Accept' value: 'application/vnd.travis-ci.2+json'.
  ].
body := response content.
Transcript show: body

Solve SSL Error:

Comment in WebClient-Core>>WebClient>>sslConnect the following line:

"stream verifyCert: self serverName."