Using ISE's HTTP classes 
Author Message
 Using ISE's HTTP classes

Unfortunately ISE provide no documentation on the use of
HTTP_PROTOCOL. Does anyone know how to use it? I thought something
like this might work:

        test_http is
                local
                        url: HTTP_URL
                        http_request: HTTP_PROTOCOL
                        result_string: STRING
                do
                        !! result_string.make (0)
                        !! url.make ("http://server/MyWebForm/WebForm1.aspx")
                        !! http_request.make (url)
                        http_request.set_read_mode
                        http_request.open
                        from
                                http_request.initiate_transfer
                        until
                                not http_request.is_packet_pending
                        loop
                                http_request.read
                                result_string.append_string (http_request.last_packet)
                        end
                        http_request.close
                        io.put_string (result_string)
                end

When I execute the above code I get the following error:

"Code: 3 (Precondition violated.) Tag: valid_peer_host"

In the method of the class NETWORK_STREAM_SOCKET:

        make_client_by_port (a_peer_port: INTEGER; a_peer_host: STRING) is
                        -- Create a client connection to `a_peer_host' on
                        -- `a_peer_port'.
                require
                        valid_peer_host: a_peer_host /= void and then not
a_peer_host.is_empty
                        valid_port: a_peer_port >= 0

Note - a_peer_host = void.

Any help appreciated.

Thanks.



Tue, 14 Dec 2004 16:54:52 GMT  
 Using ISE's HTTP classes
Hello,

Tell ISE about this issue:

I have just posted a dozen messages (politely, I hope) at the ISE Eiffel
Newsgroup at: http://groups.yahoo.com/group/ise_users.

I think they deserve to hear this from more people: It is the only way we
can hope that they improve. Today the system looks like it is for the
"invited only": The ones that started to use it back in the eighties, and
has followed the system ever since: It is a shame, since it is really a
GREAT system.

my name appears as: geiroves

regards

Geir Ove

Norway


Quote:
> Unfortunately ISE provide no documentation on the use of
> HTTP_PROTOCOL. Does anyone know how to use it? I thought something
> like this might work:

> test_http is
> local
> url: HTTP_URL
> http_request: HTTP_PROTOCOL
> result_string: STRING
> do
> !! result_string.make (0)
> !! url.make ("http://server/MyWebForm/WebForm1.aspx")
> !! http_request.make (url)
> http_request.set_read_mode
> http_request.open
> from
> http_request.initiate_transfer
> until
> not http_request.is_packet_pending
> loop
> http_request.read
> result_string.append_string (http_request.last_packet)
> end
> http_request.close
> io.put_string (result_string)
> end

> When I execute the above code I get the following error:

> "Code: 3 (Precondition violated.) Tag: valid_peer_host"

> In the method of the class NETWORK_STREAM_SOCKET:

> make_client_by_port (a_peer_port: INTEGER; a_peer_host: STRING) is
> -- Create a client connection to `a_peer_host' on
> -- `a_peer_port'.
> require
> valid_peer_host: a_peer_host /= void and then not
> a_peer_host.is_empty
> valid_port: a_peer_port >= 0

> Note - a_peer_host = void.

> Any help appreciated.

> Thanks.



Sun, 19 Dec 2004 09:42:54 GMT  
 Using ISE's HTTP classes
Hi,

I am waiting for my membership to be accepted at the Yahoo group, so I
will have to wait to read your postings. However, I have established a
workaround by creating set_host() and set_path() methods in the Eiffel
provided class NETWORK_RESOURCE_URL. So my use of the class
HTTP_PROTOCOL is:

        test_http is
                local
                        url: HTTP_URL
                        http_request: HTTP_PROTOCOL
                        result_string, path_string: STRING
                do
                        !! result_string.make (0)
                        !! path_string.make_from_string
("slipstream/SUI/getActiveBreakFromValuer.asp")
                        !! url.make ("http://london_slip41/" + path_string)
                        url.set_host ("london_slip41")
                        url.set_path (path_string)
                        !! http_request.make (url)
                        http_request.set_read_mode
                        http_request.open
                        from
                                http_request.initiate_transfer
                        until
                                not http_request.is_packet_pending
                        loop
                                http_request.read
                                result_string.append_string (http_request.last_packet)
                        end
                        http_request.close
                        io.put_string (result_string)
                end

I must say I am appalled that ISE do not provide any examples or
documentation of this class. Not only that, but they have also not
responded to my e-mails.

Thanks for your feedback!

Dean.


Quote:
> Hello,

> Tell ISE about this issue:

> I have just posted a dozen messages (politely, I hope) at the ISE Eiffel
> Newsgroup at: http://groups.yahoo.com/group/ise_users.

> I think they deserve to hear this from more people: It is the only way we
> can hope that they improve. Today the system looks like it is for the
> "invited only": The ones that started to use it back in the eighties, and
> has followed the system ever since: It is a shame, since it is really a
> GREAT system.

> my name appears as: geiroves

> regards

> Geir Ove

> Norway



> > Unfortunately ISE provide no documentation on the use of
> > HTTP_PROTOCOL. Does anyone know how to use it? I thought something
> > like this might work:

> > test_http is
> > local
> > url: HTTP_URL
> > http_request: HTTP_PROTOCOL
> > result_string: STRING
> > do
> > !! result_string.make (0)
> > !! url.make ("http://server/MyWebForm/WebForm1.aspx")
> > !! http_request.make (url)
> > http_request.set_read_mode
> > http_request.open
> > from
> > http_request.initiate_transfer
> > until
> > not http_request.is_packet_pending
> > loop
> > http_request.read
> > result_string.append_string (http_request.last_packet)
> > end
> > http_request.close
> > io.put_string (result_string)
> > end

> > When I execute the above code I get the following error:

> > "Code: 3 (Precondition violated.) Tag: valid_peer_host"

> > In the method of the class NETWORK_STREAM_SOCKET:

> > make_client_by_port (a_peer_port: INTEGER; a_peer_host: STRING) is
> > -- Create a client connection to `a_peer_host' on
> > -- `a_peer_port'.
> > require
> > valid_peer_host: a_peer_host /= void and then not
> > a_peer_host.is_empty
> > valid_port: a_peer_port >= 0

> > Note - a_peer_host = void.

> > Any help appreciated.

> > Thanks.



Sun, 19 Dec 2004 17:24:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using 'prof' with Eiffel 3 ISE

2. predefined classes in ISE's Eiffel 3

3. Error in ISE's date_time class?

4. downloading pictures using 'net/http'

5. Help wanted using ISE's EiffelCOM with Excel

6. Anyone used ISE's new time library?

7. I don't want characters translated in query using http::geturl

8. Access to T'Class vs T'Class as parameter to subprogram

9. Paper on using VW's XML and XSL classes

10. Printer's problems using the PyCRichEditView class

11. Back door to 'slot-value-using-class?

12. ISE and 'others'

 

 
Powered by phpBB® Forum Software