Страницы: 1
RSS
Подбор атрибутов для POST-запроса через VBA, Как сформировать POST-запроса через VBA, если судя по Инспектору он содержит много атрибутов
 
подскажите, пожалуйста, как сформировать атрибут к HTTP.send для случая на сайте https://registers.esma.europa.eu/publication/searchRegister?core=esma_registers_firds
где имеется форма запроса с полем Instrument identification code (ввожу IE00BYTRR863). Вот такого рода вижу текст в поле Request:
Код
{core: "esma_registers_firds", pagingSize: "10", start: 0, keyword: "", sortField: "isin asc",…}
core: "esma_registers_firds"
criteria: [{name: "isin", value: "IE00BYTRR863", type: "text", isParent: true},…]
0: {name: "isin", value: "IE00BYTRR863", type: "text", isParent: true}
isParent: true
name: "isin"
type: "text"
value: "IE00BYTRR863"
1: {name: "firdsPublicationDateCustomSearchInputField",…}
isParent: true
name: "firdsPublicationDateCustomSearchInputField"
type: "customSearchInputFieldQuery"
value: "(latest_received_flag:1)AND(never_published_flag:0)"
keyword: ""
pagingSize: "10"
sortField: "isin asc"
start: 0
wt: "json"
 
JohnClayton, слать вам нужно на этот адрес:
https://registers.esma.europa.eu/publication/searchRegister/doMainSearch

Вот функция, дело за малым:
Код
Function postj(ByVal URL$, ByVal json As String) As String
    With CreateObject("Microsoft.XMLHTTP")
        .Open "POST", Replace(URL$, "\", "/"), "False"
        .setRequestHeader "If-Modified-Since", "Thu, 1 Jan 1970 00:00:00 UTC"
        .setRequestHeader "Content-Type", "application/json; charset=utf-8"
        .setRequestHeader "Accept-Language", "ru-RU"
        .send (json)
        If .statustext = "OK" Then postj = .responseText
    End With
End Function
Страницы: 1
Наверх