Skip to content

Commit

Permalink
top (SAP#4787)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMieg authored and maxatsap committed Jul 23, 2024
1 parent a6ccbc5 commit 9e6e0ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/abaputils/sap_com_0948.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,11 @@ func (api *SAP_COM_0948) initialRequest() error {
Password: api.con.Password,
})

// HEAD request to the root is not sufficient, as an unauthorized called is allowed to do so
// Therefore, the request goes to the "Actions" entity without actually fetching data
headConnection := api.con
headConnection.XCsrfToken = "fetch"
headConnection.URL = api.con.URL + api.path + api.actionsEntity
headConnection.URL = api.con.URL + api.path + api.actionsEntity + "?$top=0"

// Loging into the ABAP System - getting the x-csrf-token and cookies
resp, err := GetHTTPResponse("GET", headConnection, nil, api.client)
Expand Down

0 comments on commit 9e6e0ab

Please sign in to comment.