-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I send an http post request with properties, in the body or in headers? #2149
Comments
This is an alternative solution because it only works through query string parameters, but it does not work with properties in the body or headers @hibrenda |
hi @MunozVictor can you share the exact shape of the body you expect to use? |
It's in the picture @cwhitten . The problem is not in my json , the problem is that you cannot put a reference to a property in the body. I rewrite my question, How can I send an http post request with a body builded dynamically? It's indifferent if is this : or this :
Because my property can be an a json. The problem is the validator to json and syntax to reference to the properties inside the body and headers |
@MunozVictor, could we know which composer version are your using? Previously we are using this format to form a HttpBody: Please try that and let me know if it works. |
This comment has been minimized.
This comment has been minimized.
@MunozVictor oh, I am really sorry, I missed the quotes in my reply. |
Works! Thanks @luhan2017 |
Hi @luhan2017 , How can I send a integer ?, because your solution it's only valid for send strings |
@munozemilio this can be achieved using the Closing |
@Barisc I think this is because it is a GET request, and you want to POST the body. Could you please try to update the GET to POST? |
Sorry I'm getting the same error. There is information that there is a
grant-type error. I want to show you the way I sent it and the error I got.
It is attached.
[image: 55.PNG] [image: error2.PNG]
Lu Han <notifications@github.com>, 9 Ara 2020 Çar, 04:17 tarihinde şunu
yazdı:
… @Barisc <https://github.com/BarisC> I think this is because it is a GET
request, and you want to POST the body. Could you please try to update the
GET to POST?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBMMNZDUYQEJ6GURB2TIJ3ST3F27ANCNFSM4K7VVGEQ>
.
|
Note: I used Post instead of Get. The problem continued.
Barış Çoruh <barislg54@gmail.com>, 9 Ara 2020 Çar, 12:45 tarihinde şunu
yazdı:
… Sorry I'm getting the same error. There is information that there is a
grant-type error. I want to show you the way I sent it and the error I got.
It is attached.
[image: 55.PNG] [image: error2.PNG]
Lu Han ***@***.***>, 9 Ara 2020 Çar, 04:17 tarihinde şunu
yazdı:
> @Barisc <https://github.com/BarisC> I think this is because it is a GET
> request, and you want to POST the body. Could you please try to update the
> GET to POST?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#2149 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEBMMNZDUYQEJ6GURB2TIJ3ST3F27ANCNFSM4K7VVGEQ>
> .
>
|
Describe the bug
How can I send an http post request with properties, in the body or in headers?
I don't know what the correct syntax is to be able to send properties in the "Send Http request". or if it is possible or not, since when I put the properties in the body the json validator does not pass and in headers it returns an error. Is it possible to remove the json validator to allow the reference of properties?
Version
Browser
OS
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: