Passing json in the body of a request
I 'm trying to replicate the following example with toddle . (BTW . . . this is how fastgen requests an auth token ) curl --location 'https://my-project.fastgenapp.com/auth/signin' \
--header 'rid: thirdpartyemailpassword' \
--header 'Content-Type: application/json' \
--data-raw '{
"formFields": [
{
"id": "email",
"value": "timon@fastgen.com"
}, {
"id": "password",
"value": "<mySecretPassword1>"
}
]
}'for my initial tests I 'm hardcoding . When I attempt to add the contents of data -raw as a value in the body I get the error : "json: cannot unmarshal string into Go value of type map[string]interface {}\n" I cover it in this video https://youtu.be/NItmmOhjXbA?si=_n0O4aaJTUJf7RZe @ my future self . . . important stuff from the video : some key ideas : 1 . bind input form fields to variables : https://youtu.be/NItmmOhjXbA?si=9MXS1qZPCn7F7VOR&t=1058 2 . use a formula to dynamically customise the request : https://youtu.be/NItmmOhjXbA?si=ObOO4Se_VSsB76vS&t=2194 3 . trigger based on form submit : https://youtu.be/NItmmOhjXbA?si=pKLTCFDK8kahguxT&t=2256 4 . present errors to the user : https://youtu.be/NItmmOhjXbA?si=AH7-4xdSjioqQjUk&t=2474 5 . store auth token in a cookie : https://youtu.be/NItmmOhjXbA?si=wihVi46cOMG2r0Y1&t=2730 @Andreas Møller
It is now Typically adding a zero entry ( 0 0 : 0 0 :00 - Intro ) does the trick 👇🏾 0 0 : 0 0 :00 - Introduction 👈🏾 0 0 : 1 7 :38 - bind form fields to variables 0 0 : 3 6 :34 - use a formula to dynamically customise the request 0 0 : 3 7 :36 - trigger based on form submit 0 0 : 4 1 :14 - present errors to the user 0 0 : 4 5 :30 - store auth token as session cookie and go to url 0 0 : 5 3 :07 - add toddle chrome plugin (to support cookie tracking in the editor ) 0 0 : 5 4 :36 - create a /login page 0 1 : 0 0 :00 - use securely stored access token (authorization header )



.jpeg/public)