Sample code for 30+ languages & platforms
PureBasic

Example: Http.GetUrlPath method

Demonstrates the GetUrlPath method.

Chilkat PureBasic Downloads

PureBasic
IncludeFile "CkHttp.pb"

Procedure ChilkatExample()

    success.i = 0

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    url.s = "https://example.com/folder/page?lang=en&sort=asc#section2"
    Debug CkHttp::ckGetUrlPath(http,url)

    ; Output:

    ; /folder/page


    CkHttp::ckDispose(http)


    ProcedureReturn
EndProcedure