Re: POST
Thanks Andu, just what I needed! Now I know I could do all this with sockets, but as there is built in "post" and "get" methods in metaTalk how do I set the httpheaders to look like below? Andu (pretty please), if you have a spare moment could you post examples of a form submission from Netscape/Explorer using the "get" method, and also what Metacard's built in "post" and "get = get url someurl?someparams". That would give a complete picture... Thanks From: andu [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Fri, 14 Jul 2000 20:42:47 -0400 (EDT) To: [EMAIL PROTECTED] Subject: Re: POST Andu, do you know what is sent in the http header from a browser such as Netscape/Explorer. If you could send me an example input I could see if I can get the CGI I am playing with to work? This is a web page with 2 fields for username and password and a Submit button: __ POST / HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/4.7 (Macintosh; I; PPC) Host: xxx.xxx.xxx.xxx Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 Content-type: application/x-www-form-urlencoded Content-length: 50 Field-user=anduSubmit=SubmitField-pass=also-andu __ Notice the 2 empty lines between the header and the data (crlf crlf) must be there. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.
Oops!
Uh... Sorry for those who tried to visit the web page I posted... they've got the power down at my school to replace the air conditioning system and check the backup generators (at least that's what they told me!) I'll post when the power is restored at my school and the site is back up! :) Richard MacLemale Instructional Technology Specialist James W. Mitchell High School Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.
Re: POST
Thanks Andu, just what I needed! Now I know I could do all this with sockets, but as there is built in "post" and "get" methods in metaTalk how do I set the httpheaders to look like below? Andu (pretty please), if you have a spare moment could you post examples of a form submission from Netscape/Explorer using the "get" method, This is what the server receives from the same form but using GET.: GET /?Field-user=anduSubmit=SubmitField-pass=also-andu/ HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/4.7 (Macintosh; I; PPC) Host: xxx.xxx.xxx.xxx Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 and also what Metacard's built in "post" and "get = get url someurl?someparams". That would give a complete picture... get url "http://www.metacard.com" ; put it post "I should read the docs first" to url "the_url.com" Thanks From: andu [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Fri, 14 Jul 2000 20:42:47 -0400 (EDT) To: [EMAIL PROTECTED] Subject: Re: POST Andu, do you know what is sent in the http header from a browser such as Netscape/Explorer. If you could send me an example input I could see if I can get the CGI I am playing with to work? This is a web page with 2 fields for username and password and a Submit button: __ POST / HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/4.7 (Macintosh; I; PPC) Host: xxx.xxx.xxx.xxx Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 Content-type: application/x-www-form-urlencoded Content-length: 50 Field-user=anduSubmit=SubmitField-pass=also-andu __ Notice the 2 empty lines between the header and the data (crlf crlf) must be there. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.
Re: POST
Thanks again Andu... From: andu [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Sat, 15 Jul 2000 12:42:34 -0400 (EDT) To: [EMAIL PROTECTED] Subject: Re: POST This is what the server receives from the same form but using GET.: GET /?Field-user=anduSubmit=SubmitField-pass=also-andu/ HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/4.7 (Macintosh; I; PPC) Host: xxx.xxx.xxx.xxx Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 but I meant what does the server see following a standard Metacard post/get operation as compared to the above examples from Netscape. and also what Metacard's built in "post" and "get = get url someurl?someparams". That would give a complete picture... get url "http://www.metacard.com" ; put it post "I should read the docs first" to url "the_url.com" I'd like to see what the standard http headers that Metacard sends with these commands and how they can be changed/overridden. Thanks a bundle. NB. Scott if your reading (as ever), is there really no documentation at all on httpheaders property? Do you get this sort of stuff here form the list, or is there any other form of more extensive documentation you can get hold of (naturally at a price?) Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.
Re: POST
On Sat, 15 Jul 2000, David Bovill wrote: Thanks again Andu... From: andu [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Sat, 15 Jul 2000 12:42:34 -0400 (EDT) To: [EMAIL PROTECTED] Subject: Re: POST This is what the server receives from the same form but using GET.: GET /?Field-user=anduSubmit=SubmitField-pass=also-andu/ HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/4.7 (Macintosh; I; PPC) Host: xxx.xxx.xxx.xxx Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Encoding: gzip Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 but I meant what does the server see following a standard Metacard post/get operation as compared to the above examples from Netscape. and also what Metacard's built in "post" and "get = get url someurl?someparams". That would give a complete picture... get url "http://www.metacard.com" ; put it post "I should read the docs first" to url "the_url.com" I'd like to see what the standard http headers that Metacard sends with these commands and how they can be changed/overridden. Thanks a bundle. NB. Scott if your reading (as ever), is there really no documentation at all on httpheaders property? Do you get this sort of stuff here form the list, or is there any other form of more extensive documentation you can get hold of (naturally at a price?) I think you're expecting too much: the httpHeaders property is empty by default, and you'll find documentation about what you can put in there by reading the HTTP protocol RFCs. By default MetaCard just includes the first line and a "Content-Length:" header. Putting some of the others (particularly the Host: header) wouldn't be a bad idea, depending what HTTP server you're trying to connect to. Regards, Scott Scott Raney [EMAIL PROTECTED] http://www.metacard.com MetaCard: You know, there's an easier way to do that... Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.
Re: POST
Thanks Scott... From: Scott Raney [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Sat, 15 Jul 2000 13:09:01 -0600 (MDT) To: [EMAIL PROTECTED] Subject: Re: POST On Sat, 15 Jul 2000, David Bovill wrote: I think you're expecting too much: Oh no, not again -:) the httpHeaders property is empty by default, and you'll find documentation about what you can put in there by reading the HTTP protocol RFCs. By default MetaCard just includes the first line and a "Content-Length:" header. Putting some of the others (particularly the Host: header) wouldn't be a bad idea, depending what HTTP server you're trying to connect to. I guess you answered all the questions I asked (once again): 1) This (wonderful) list is the source of everything that is known 2) There is no further documentation (search the archives then ask the list) Scott you ever thought of cutting and pasting these little gems into the script dictionary? Regards, Scott Scott Raney [EMAIL PROTECTED] http://www.metacard.com MetaCard: You know, there's an easier way to do that... Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.
Re: Digest metacard.v003.n439
I am trying to send an attachment file with the mcmail.mc file. So far, this is what I have done: I put a field "theAttachment" into the card. The script is from the button "Send", with my addition clearly marked. It does something, but it doesn't place it as an attachment, but as a part of the body text. # construct email header put "" into mailraw put "From: " fld "mailfrom" crlf after mailraw put "Date: " mimedate() crlf after mailraw put "Content-Type: text/plain; charset=us-ascii" crlf after mailraw put "MIME-Version: 1.0" crlf after mailraw put "Message-Id: " the seconds "-" the ticks "@MetaCardSMTP" crlf after mailraw put "To: " fld "to" crlf after mailraw if fld "cc" "" then put "CC: " fld "cc" crlf after mailraw end if put "Subject: " fld "subject" crlf after mailraw put crlf fld "body" after mailraw -- ** MY ADDITION if fld "theAttachment" is not empty then put fld "theAttachment" into theAttachmentName put "binfile:" theAttachmentName into theattachment put crlf "Content-Type: application/base64; name=" quote theattachment quote after mailraw put crlf crlf base64Encode(url theAttachment) after mailraw end if -- # socket implementation, talking to smtp smtpsend fld "smtpserver",fld "mailfrom",validEmailList,mailraw end composemail -- I sent the file (a MetaCard file) to myself. I copied and pasted the encoded data in my email into a MC field. A button has the following script: on mouseUp ask file "What file to save to?" put it into thefileName put base64Decode(field "thebinfile") into URL thefileName end mouseUp But now, when I attempt to open the file (type into the message box "Answer file "?"; open it), I get the message "stack was corrupted by a non-binary file transfer" - So, any suggestions? I really *need* to be able to send file attachments with this MCmail protocol. I am building an app that will generate a MC stack, then email it to the appropriate person. Thanks for your help, Raymond Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.
Re: Digest metacard.v003.n439
I am trying to send an attachment file with the mcmail.mc file. So far, this is what I have done: I put a field "theAttachment" into the card. The script is from the button "Send", with my addition clearly marked. It does something, but it doesn't place it as an attachment, but as a part of the body text. # construct email header put "" into mailraw put "From: " fld "mailfrom" crlf after mailraw put "Date: " mimedate() crlf after mailraw put "Content-Type: text/plain; charset=us-ascii" crlf after mailraw put "MIME-Version: 1.0" crlf after mailraw put "Message-Id: " the seconds "-" the ticks "@MetaCardSMTP" crlf after mailraw put "To: " fld "to" crlf after mailraw if fld "cc" "" then put "CC: " fld "cc" crlf after mailraw end if put "Subject: " fld "subject" crlf after mailraw put crlf fld "body" after mailraw -- ** MY ADDITION if fld "theAttachment" is not empty then put fld "theAttachment" into theAttachmentName Try put url "binfile:" theAttachmentName into theattachment put crlf "Content-Type: application/base64; name=" quote \ theAttachmentName quote after mailraw put crlf crlf base64Encode(theattachment) after mailraw put "binfile:" theAttachmentName into theattachment put crlf "Content-Type: application/base64; name=" quote theattachment quote after mailraw put crlf crlf base64Encode(url theAttachment) after mailraw end if -- # socket implementation, talking to smtp smtpsend fld "smtpserver",fld "mailfrom",validEmailList,mailraw end composemail -- I sent the file (a MetaCard file) to myself. I copied and pasted the encoded data in my email into a MC field. A button has the following script: on mouseUp ask file "What file to save to?" put it into thefileName put base64Decode(field "thebinfile") into URL thefileName end mouseUp But now, when I attempt to open the file (type into the message box "Answer file "?"; open it), I get the message "stack was corrupted by a non-binary file transfer" - So, any suggestions? I really *need* to be able to send file attachments with this MCmail protocol. I am building an app that will generate a MC stack, then email it to the appropriate person. Thanks for your help, Raymond Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to [EMAIL PROTECTED], not this list.