PureBasic
PureBasic
Example: Http.GetUrlPath method
Demonstrates theGetUrlPath method.
Chilkat PureBasic Downloads
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