Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

http cookies

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-24-2008, 03:24 PM
Newbie
 
Join Date: Jun 2007
Posts: 2
Default http cookies

Hi,

I'm writing a program that needs to send a cookie to a website to get the right info back. I have tried to use AddHeader(), but this throws up a .NET error when you try to add multiline data like cookie data.

fileopen(df1,"cookie.txt",cread)
cookie=filereadtoend(df1)
fileclose(df1)
wrep.new1
wreq.new1(link)
wreq.AddHeader("Cookie",cookie)
--Errors at this point


Can anyone help please?
Reply With Quote
  #2 (permalink)  
Old 08-24-2008, 03:55 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Try to encode special characters like crlf according to this table: HTML URL-encoding Reference

You will need something like:
Code:
cookie = StrReplace(cookie,crlf,"%0d")
Reply With Quote
  #3 (permalink)  
Old 08-24-2008, 06:19 PM
Newbie
 
Join Date: Jun 2007
Posts: 2
Smile

Thank you for the advice Erel, I'm now using StrReplace(cookie,crlf,"") and have edited my cookie.txt to correct a silly error that I missed earlier.

Thank you
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP library v1.4 Erel Official Updates 2 10-29-2008 10:11 PM
HTTP Library bish0p Questions (Windows Mobile) 4 09-12-2008 02:24 PM
Http.dll+proxy=? Byak@ Questions (Windows Mobile) 9 08-09-2008 05:23 PM
HTTP Bug NEW3 dibesw Italian Forum 5 08-02-2008 01:21 PM
http get JPG to Image mamuen Questions (Windows Mobile) 2 03-26-2008 09:42 PM


All times are GMT. The time now is 10:08 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0