login about faq

How do i set a useragent when I POST data in delphi?

I've set it for doing Get.. but there seems to be no option for PostUrlEncoded..the website I am posting to requires a useragent.

please help

asked Jul 11 '15 at 15:05

delphi777's gravatar image

delphi777
112


Does calling the AddHeader method of the HttpRequest object before posting the request work? e.g.

req.AddHeader "User-Agent", "My User Agent Value"
link

answered Jul 11 '15 at 15:59

jpbro's gravatar image

jpbro ♦
1.1k2618

that worked, thank you

link

answered Jul 11 '15 at 16:54

delphi777's gravatar image

delphi777
112

Glad to help! Now you can help others who might encounter the same problem in the future by accepting the answer by clicking the checkmark icon beside my post above ;)

(Jul 11 '15 at 17:05) jpbro ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×186
×56
×26

Asked: Jul 11 '15 at 15:05

Seen: 732 times

Last updated: Jul 11 '15 at 17:05

powered by OSQA