Answer the question
In order to leave comments, you need to log in
How to submit a json contact form to an external resource?
there is an html application form
<form method="POST">
<div class="title">
<i class="fas fa-pencil-alt"></i>
<h2>example</h2>
</div>
<div class="info">
<input type="text" name="hash" placeholder="">
<input type="text" name="fio" placeholder="ФИО">
<input type="text" name="email" placeholder="Электронная почта">
<input type="number" name="phone" placeholder="+7(7__) ___ __ __" class="rfield" />
<input type="number" name="iin" placeholder="ИИН">
<input type="number" name="loan_amount" placeholder="Сумма кредита">
</div>
<button onclick="sendJSON()">Отправить</button>
<p class="result" style="color:blue"></p>
</form>
Answer the question
In order to leave comments, you need to log in
The instructions should have told you how the hash field is formed in the request body (including the order of the fields), most likely you are given some kind of secret key, with the help of which this is done according to some crypto-resistant algorithm.
We can only guess here, if this is HTTP Authorization Basic, then you must have a
login and password, all the main libraries support this authorization, everyone uses curl in php, the first example from Google
client, the secret login/password (or key) will become available to all users. Those. a request must be sent from the client in your format, and the server already forms the correct one, receives a response and returns it to the client.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question