Re: Why does this https post request always return "404 Not Found"

2008-06-21 Thread Jens Alfke
This is pretty weird. After some experimenting, I narrowed it down to  
the value of the User-Agent header. I think the del.icio.us server is  
checking that header and returning a 404 if it doesn't like it. And it  
doesn't seem to like CFNetwork's default user-agent header, though it  
likes Safari and curl.


You can programmatically set the "User-Agent" header value to "Mozilla/ 
5.0 (Macintosh; U; Intel Mac OS X 10_5_3; en-us) AppleWebKit/525.18  
(KHTML, like Gecko) Version/3.1.1 Safari/525.20" and the result should  
work.


On the other hand, why are you trying to log into del.icio.us using  
forms and cookies as though you were a web browser? That site already  
has a pretty comprehensive API for applications to access it; you  
should use that instead. (That may in fact be what they're trying to  
tell you by blocking your request.)


—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Why does this https post request always return "404 Not Found"

2008-06-21 Thread an0
Cool, it works. Thanks a lot.
But as to APIs, I really can't find the login API, or I would of
course use that instead of posting forms.
Can you tell me where the login API is?

On Sun, Jun 22, 2008 at 6:32 AM, Jens Alfke <[EMAIL PROTECTED]> wrote:
> This is pretty weird. After some experimenting, I narrowed it down to the
> value of the User-Agent header. I think the del.icio.us server is checking
> that header and returning a 404 if it doesn't like it. And it doesn't seem
> to like CFNetwork's default user-agent header, though it likes Safari and
> curl.
>
> You can programmatically set the "User-Agent" header value to "Mozilla/5.0
> (Macintosh; U; Intel Mac OS X 10_5_3; en-us) AppleWebKit/525.18 (KHTML, like
> Gecko) Version/3.1.1 Safari/525.20" and the result should work.
>
> On the other hand, why are you trying to log into del.icio.us using forms
> and cookies as though you were a web browser? That site already has a pretty
> comprehensive API for applications to access it; you should use that
> instead. (That may in fact be what they're trying to tell you by blocking
> your request.)
>
> —Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Why does this https post request always return "404 Not Found"

2008-06-22 Thread Steve Christensen

Hmmm... Google not working?

-  lists the APIs for a  
variety of programming languages at the bottom of the page.


-  is an open source Cocoa  
del.icio.us client, so you should be able to see what they did.



On Jun 21, 2008, at 10:14 PM, an0 wrote:


Cool, it works. Thanks a lot.
But as to APIs, I really can't find the login API, or I would of
course use that instead of posting forms.
Can you tell me where the login API is?

On Sun, Jun 22, 2008 at 6:32 AM, Jens Alfke <[EMAIL PROTECTED]>  
wrote:
This is pretty weird. After some experimenting, I narrowed it down  
to the
value of the User-Agent header. I think the del.icio.us server is  
checking
that header and returning a 404 if it doesn't like it. And it  
doesn't seem
to like CFNetwork's default user-agent header, though it likes  
Safari and

curl.

You can programmatically set the "User-Agent" header value to  
"Mozilla/5.0
(Macintosh; U; Intel Mac OS X 10_5_3; en-us) AppleWebKit/525.18  
(KHTML, like

Gecko) Version/3.1.1 Safari/525.20" and the result should work.

On the other hand, why are you trying to log into del.icio.us  
using forms
and cookies as though you were a web browser? That site already  
has a pretty

comprehensive API for applications to access it; you should use that
instead. (That may in fact be what they're trying to tell you by  
blocking

your request.)


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]