Skip to content

Error BASE/1004 No exported method: CPROTO #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pwypustek opened this issue Apr 17, 2025 · 1 comment
Open

Error BASE/1004 No exported method: CPROTO #384

pwypustek opened this issue Apr 17, 2025 · 1 comment

Comments

@pwypustek
Copy link

#include "hbclass.ch"

FUNCTION Main()
LOCAL oHttp := TIPClientHttp():New() // tworzenie obiektu
LOCAL cHtml

    IF oHttp:Open( "example.com", 80 )
        oHttp:cProto := "GET"
        cHtml := oHttp:ReadAll( "/" )
        ? "Rec:"
        ? Left( cHtml, 200 )
        oHttp:Close()
    ELSE
        ? "Error"
    ENDIF  

RETURN NIL

C:\hb\bin\win\msvc\hbmk2.exe ./main.prg -lhbtip
Windows 11
MS Visual Studio 2019

@dszlage
Copy link

dszlage commented Apr 17, 2025

Hi, Paweł
Class TIPClientHttp has no method or attribute "cProto"
"cProto" is an attribute of the "TUrl" object and you can refer to it via the "oUrl" attribute which holds an instance of the "TUrl" object

oHttp:oUrl:cProto := "GET"

Regards, Damian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants