radumg / DynaWeb

DynaWeb is a Dynamo package providing support for interaction with the interwebz in general and with REST APIs in particular.
https://radumg.github.io/DynaWeb/
GNU Affero General Public License v3.0
43 stars 15 forks source link

I am struggling to pass a body with my POST request #33

Open jdarling20 opened 4 years ago

jdarling20 commented 4 years ago

Expected Behavior

What I submit a POST to my login API using the WebRequest.AddParameter node and supplying a string node with my JSON body, I would expect that my parameters email_address and password are passed in the body of my request and that my response will be as I see in postman or in my application.

Actual Behavior

What I am seeing instead is that my parameters email_address and password are not passed and my request return an error stating that my email_address parameter's value is undefined.

Steps to Reproduce the Problem

I've attached the .dyn file that I'm using here, and copied the contents of the string node that I'm using with for the contents of the Body for my request.

Get Data from API_post.zip

I would imagine that I simply have a syntax issue, potentially with my quotes or apostrophes.

As a note, I am using this login process to receive a JWT so that I can pass it with my other requests. If I log in via Postman and copy the contents of my JWT into my GET request (not included in this file), I am able to return a 200 response with my data as-expected. The bottleneck I seem to be having here is restricted to how I properly pass a JSON body with my POST request.

Specifications

- Dynamo : 2.3
- Operating system : Windows 10 (1809)
- .NET :  4.8