Skip to content
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

hbcurl: multi interface implementation #344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

emazv72
Copy link
Contributor

@emazv72 emazv72 commented Nov 22, 2024

Added support for libcurl multi interface.
A sample http client implementation using the multi interface for non blocking scenarios follows.

  Local oHttpClient  := HttpClient():New()
  Local response
      
  oHttpClient:Reset()
  oHttpClient:SetUrl( mockServer )
  oHttpClient:SetHeaders( { MEDIA_JSON } )
  
  oHttpClient:SetLogging( .T. )
  oHttpClient:Prepare( HTTP_METHOD_GET )
  oHttpClient:BeginTransfer()

  DO WHILE oHttpClient:HasMoreData()
      Inkey( .1)
  ENDDO

  response := oHttpClient:EndTransfer()

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

Successfully merging this pull request may close these issues.

1 participant