CURLSMBS Header grab (Solved)

With HTTPSocket and headers received I put a simple line as bellow to grab the results from the header

Dim X_WP_Total as integer X_WP_Total =val(Me.ResponseHeader("X-WP-Total"))
How can I grab it with CURLSMBS?
I am sure I missing something…

Headers

HTTP/1.1 200 OK Server: nginx Date: Mon, 25 Jun 2018 09:39:33 GMT Content-Type: application/json; charset=UTF-8 Transfer-Encoding: chunked Connection: close Vary: Accept-Encoding X-Robots-Tag: noindex X-Content-Type-Options: nosniff Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages Access-Control-Allow-Headers: Authorization, Content-Type Expires: Wed, 11 Jan 1984 05:00:00 GMT Cache-Control: no-cache, must-revalidate, max-age=0 X-WP-Total: 219 <-------Grab This X-WP-TotalPages: 3 <-------Grab This Link: <https://mysite?consumer_key=mykey&consumer_secret=mySecret&per_page=100&page=2>; rel="next" Allow: GET, POST Set-Cookie: yith_wcwl_products=%5B%5D; expires=Mon, 25-Jun-2018 08:39:31 GMT; Max-Age=0; path=/ Set-Cookie: wfwaf-authcookie-f9428fb511972a5c3b4ec1fad4ece29d=1%7Cadministrator%7Cefee98a4feae92dfb0c0b54aa1f9ee14a5c4755081; expires=Mon, 25-Jun-2018 21:39:31 GMT; Max-Age=43200; path=/; HttpOnly X-Powered-By: PleskLin

Thank you.

Well, you get headers via header event.
Or if CollectHeader property is true, you see all headers in HeaderData property.
Which you can split in lines and look for the ones with right prefix.

If you grab the headers through Xojo’s HTTPSocket, you can use RegEx to get what you’re looking for…

X-WP-Total: ([0-9]*) X-WP-TotalPages: ([0-9]*)

[quote=394727:@Christian Schmitz]Well, you get headers via header event.
Or if CollectHeader property is true, you see all headers in HeaderData property.
Which you can split in lines and look for the ones with right prefix.[/quote]
Thank you Christian I miss the Event.
I will try both.

[quote=394729:@shao sean]If you grab the headers through Xojo’s HTTPSocket, you can use RegEx to get what you’re looking for…

X-WP-Total: ([0-9]*) X-WP-TotalPages: ([0-9]*)[/quote]

Thank you shao no problems with HTTPSocket is working fine…

I could of course add some kind of headers dictionary automatically.
Presuming there are no duplicates, that should simply work…

If there are duplicates, could you not just make it an array in that dictionary value?