and again dll and market - page 17

 
Maxim Kuznetsov:

http does not have -u or --output-file headers

but all headers are passed as key:value separated by \r\n (that's almost exactly the reference quote)

curl has a switch that will print out the entire communication with the server (and all headers) in detail...

===

"read mana, they rule"

you're probably right, and the screenshot from postman, where the output pair is written in the http request header is explained in some other way )

i suspect we're still talking about the same thing, but in different words )

 
Nikolai Karetnikov:

and please, please, no more playsound() it's understandable, and the problem is completely different! )))

The task is to perform authorization on IBM cloud using WebRequest.

By the way, the output to the file does get to the headers


I would not say, that everything was so clear with PlaySound )))) It turned out for example that despite the documentation, the .wav is played from the Files folder, (without which your project could be closed) and that the dynamic EA resources can not carry the played sound files, because everything is saved in uint.

As for the authorisation in the IBM cloud with WebRequest, I know no more than yours here, so far... I need to study. Experiment... It will take time.

Документация по MQL5: Сетевые функции / WebRequest
Документация по MQL5: Сетевые функции / WebRequest
  • www.mql5.com
Для использования функции WebRequest() следует добавить адреса серверов в список разрешенных URL во вкладке "Советники" окна "Настройки". Порт сервера выбирается автоматически на основе указанного протокола - 80 для "http://" и 443 для "https://". Функция WebRequest() является синхронной, это означает, что она приостанавливает выполнение...
 
Реter Konow:

Shit! I'm stuck on unions. Webrequest returns a dynamic char array, and to store it in a resource, it needs to be converted to uint. This isn't a problem if you declare a union, but the union only allows you to declare static arrays. You can't send a static array to webbrequest, because the size of the return file is undefined.

WebBrequest should be long forgotten like a bad dream.

SocketRead read s into uchar array, and then you can do whatever you want with it. In the examples from the linked documentation, which I've cited twice already, getting response via HTTP is just implemented. Modify it to suit the task and voila.

 
Serhii Shevchuk:

It is high time to forget about webrequest like a bad dream.

SocketRead reads to the uchar array and then you can do whatever you want with it. In the examples from the linked documentation, which I've already cited twice, HTTP response is implemented. Modify it to suit the task - and voila.

I agree, you have to dig in this direction. Although the authorization problem seems unsolvable, for some reason... Maybe I'm wrong again))).

 
Serhii Shevchuk:

It is high time to forget about webrequest like a bad dream.

SocketRead reads to the uchar array and then you can do whatever you want with it. In the examples from the linked documentation, which I've already cited twice, HTTP response is implemented. Modify it to suit your task - and voila.

Both webrequest and socket for data transfer use connection opening.
The webrequest creates a session implicitly, with sockets, we explicitly establish a connection.
So in both cases, the channel for data transfer is opened first one way or another.
Socket is useful when we need to transfer data for a long time without closing the connection, then yes it makes sense to use it.
But if socket is used for one-time request, it makes no sense.
Since each time the request will create a new connection, which takes time.
And to create http connection according to my measurements in C, from 100 milliseconds and above.

 
Make two requests - the first is an authorisation request and the second is a file conversion request. Maybe I said nonsense, but maybe not...))
 

I found a software program that converts the text to .wav and goes straight to the Files folder.

Picture6

 
Roman:

Both webrequest and data socket use connection opening.
Webquest creates a session implicitly, while with sockets we explicitly establish a connection.
So in both cases, the channel for data transfer is opened first one way or another.
Socket is useful when we need to transfer data for a long time without closing the connection, then yes it makes sense to use it.
But if socket is used for one-time request, it makes no sense.
Because each time the request will create a new connection, which takes time.
And to create http connection by my measurements in C, from 100 milliseconds and above.

Roman! That's what you were really missing! You feel you know and have practice! )

I'll try to modify WebRequest though.

Документация по MQL5: Сетевые функции / WebRequest
Документация по MQL5: Сетевые функции / WebRequest
  • www.mql5.com
Для использования функции WebRequest() следует добавить адреса серверов в список разрешенных URL во вкладке "Советники" окна "Настройки". Порт сервера выбирается автоматически на основе указанного протокола - 80 для "http://" и 443 для "https://". Функция WebRequest() является синхронной, это означает, что она приостанавливает выполнение...
 
Nikolai Karetnikov:

Roman! That's what was really missing! One can feel both knowledge and practice! )

I'll try to modify WebRequest

So, ask Roman, how to implement authorization on IBM server withWebRequest. This is a key question!

Документация по MQL5: Сетевые функции / WebRequest
Документация по MQL5: Сетевые функции / WebRequest
  • www.mql5.com
Для использования функции WebRequest() следует добавить адреса серверов в список разрешенных URL во вкладке "Советники" окна "Настройки". Порт сервера выбирается автоматически на основе указанного протокола - 80 для "http://" и 443 для "https://". Функция WebRequest() является синхронной, это означает, что она приостанавливает выполнение...
 
Реter Konow:

So ask Roman how to do authorization on IBM server withWebRequest. This is the key question!

I didn't get into the question, but as I understand it, a key is used, which is obtained in advance at the site where the request is sent.
In this case authorization is not needed, identification is done by key.
We must look carefully at the request structure example on the site.
As I remember from an example, the body of request is used.
That is, the headers are headers, but the text is sent to the body of the request.