Lazarus

Programming => Networking and Web Programming => Topic started by: jksmithiii on November 10, 2021, 03:31:06 pm

Title: 301 from fphttpclient
Post by: jksmithiii on November 10, 2021, 03:31:06 pm
Fun with TFPHttpClient. Simple api call works fine from browser and Postman. Client returns 301. So I set AllowRedirects. Still same error result. Anybody run into this? Maybe comparing req headers is the issue.

Thanks,
James
Title: Re: 301 from fphttpclient
Post by: jksmithiii on November 10, 2021, 04:00:58 pm
Ok, class func SimpleGet doesn't work in this case. Regular Get does.
Title: Re: 301 from fphttpclient
Post by: M[a]nny on November 16, 2021, 03:29:58 pm
Can you provide source code, please?
Title: Re: 301 from fphttpclient
Post by: Leledumbo on December 07, 2021, 04:45:22 am
Ok, class func SimpleGet doesn't work in this case. Regular Get does.
Unfortunately that's true because SimpleGet actually construct the class then simply calls Get, AllowRedirect is not set. This could be an optional parameter to retain backward compatibility, though.
TinyPortal © 2005-2018