How To use soap with authentification

Issue #6 new
Former user created an issue

Hello, could you propose an example of a connection to a soap service which requires an authentifiction with username and password.

Thanks a lot

Comments (1)

  1. dp wiz repo owner

    initTransportWithM takes an RequestProc argument which is a procedure to patch up HTTP requests containing SOAP queries.

    There is an applyBasicAuth function in http-client package that sets authentication headers for HTTP Basic auth.

    init :: IO Transport
    init = initTransportWithM _ _ (withBasicAuth "user" "hunter2") _
    
    withBasicAuth :: Username -> Password -> RequestProc
    withBasicAuth username password request = pure (applyBasicAuth username password request)
    
  2. Log in to comment