Hi,
I found some problems on Zinc implementation.
Take this example:
HTTPSocket
httpGetDocument:
'http://127.0.0.1:333/analytics/feeds/accounts/default'
args: (Dictionary new
at: 'prettyprint' put: #('true');
yourself)
accept: '*/*'
request: ('Authorization: GoogleLogin Auth={1}{2}' format: {self
authenticationKey. String crlf}
this, if I have the correct authentication key, gives me the correct answer (an
atom-xml response).
Now, if I try:
ZnHTTPSocketFacade
httpGetDocument:
'http://127.0.0.1:333/analytics/feeds/accounts/default'
args: (Dictionary new
at: 'prettyprint' put: #('true');
yourself)
accept: '*/*'
request: ('Authorization: GoogleLogin Auth={1}{2}' format: {self
authenticationKey. String crlf}
(this should work, as the facade is for compatibility, I think)
I have two errors, one of them easily solvable, and the other... well... I
couldn't solve it in the 15' I spent on it :)
1) arguments are not in the correct way. While HTTPSocket functions expect
something like this:
Dictionary new
at: 'prettyprint' put: #('true'); "<-- Parameter is an array"
yourself.
ZnHTTPSocketFacade expects something like this:
Dictionary new
at: 'prettyprint' put: 'true'; "<-- Parameter is a string"
yourself.
2) This is the hard one. If you do the get request with parameter fixed, you
should get the atom feed.
But you don't.
You get a ZnResponse who is OK (status 200), but entity is empty. I followed
the error until this method:
canReadContent
^ self hasContentLength or: [ self isChunked or: [ self
allowsReadingUpToEnd ] ]
who return false, because none of the questions is true. Then, no entity is
filled, and I have no answer :(
Hope this help :)
Cheers,
Esteban