action_dispatch.request.parameters are not being populated - ruby-on-rails

I have an API sending my app requests, and the Request Payload in my Google Chrome Debugger seems populated with data that should have populated my ActionDispatch Request Parameters, so that within the controller, I could call params, and it would draw the items found in my request payload.
My request payload
stateId=resume&Authorization=&Expires=1427487450&registration%5Fid=3&member%5Fid=1&Signature=wiXiEskkMFTsOQh9vsRg%3D&Content%2DType=application%2Fjson&X%2DExperience%2DAPI%2DVersion=1%2E0%2E1&agent=null&&activityId=http%3A%2F%2F6LHIJumrnmV%5Fcourse%5Fid&content=1k21098100101100002000
So I should be able to call params['stateId'] or params['member_id'], but my params are empty. What process has to happen inbetween the Request Payload ( or simply called Form Data ), and Rails picking it up and distributing those variables as params ?

Related

How to pass dynamic value to JSON as a API request in flutter flow?

I have two page
Login/Registration Page as of now
OTP Verification Page
API has been created and in api, we are passing phone number as request and gets otp as response. However i would like your help to know how should i able to pass the phoneNumber textfield data to APIcall json request in flutterflow?
If there is anyway or any documentation will be really helpful?
I have tried with variable method, however i was not able to pass it to json.
I have also tried jsonpath method, but no luck.
Define dynamic part of API url with brackets
https://jsonplaceholder.typicode.com/posts/[postId]
https://jsonplaceholder.typicode.com/comments?postId=[postId]
then create the variable (postId) with the same name. When adding the API call, it is required to add these variables.
See API Calls 101 for details.

How can we capture access_token, session_id values if no request is showing such values in response using jmeter?

We have a portal whose POST request parameters are:
access_token, session_id,state
But I don't see any response containing values for the above mentioned parameters at all. Is there any way I can capture it?
If you don't see the values in the response body, the following options remain:
The values are in the URL, i.e. you're redirected at least once and the redirect target contains the values you're looking for in its URL
The values are in the response headers
both locations can be expected using View Results Tree listener and both locations can be queried using i.e. Regular Expression Extractor or Boundary Extractor
The values might come as the result of an AJAX request, JMeter is not a browser and it doesn't execute JavaScript so you will need to manually simulate these calls using individual HTTP Request samplers
The values might be calculated by JavaScript on browser side, if this is the case you will need to replicate the logic using JSR223 PreProcessor and Groovy language

How to send large no of parameters with post request

Currently, I need send large no of user input parameters to the servlet. (more then 5000) But my ajax post request is giving 400 error bad request header too long.
How to handle this?
I'm taking all user entered parts as an array and passing as below:
var url = "/bin/maxim/legacy/tradecompliance?partNum="+ encodeURIComponent(array);

Swift PerfectServer: POST request and JSON body

first of all I'd like to thank the team for this amazing project, it is indeed exiting to be able to start writing server-side software in Swift.
I'm successfully running a POC using PerfectServer on an Ubuntu VM and working on the API to interact with the mobile client.
There is one aspect I didn't quite understand yet, and that is accessing the request body data from my PerfectServer Handler.
Here is the workflow I have in mind:
The client submits a POST request to PerfectServer including some
JSON encoded body data
Once that hits the "valuesForResponse:" of
my server side Handler, I retrieve the WebRequest representation of
my request successfully
The request object does expose a many
properties of the HTTP request, including headers and the url-like
formatted query parameters.
Unfortunately, I cannot see a way to retrieve the underlying request body data. I would expect that to be some kind of public properties exposing the raw data that my handle can retrieve and decode in order to process the request.
The only example provided in the Examples workspace that comes with the project and sends a POST request that includes a body is in the project Authenticator. Here the HTTP body part takes the form os a UTF-8 encoded string where the values are query-params-like formatted.
name=Matteo&password=mypassword
This gets somehow exposed on the server handler by the WebRequest "param" property, that in the inner implementation of HTTPServer seems to expect an "&" separated string of key-values:
What I would expect is to have a way to provide body data in whatever form / encoding needed, in my case a JSON form:
{"name":"Matteo", "password":"psw"}
and be able to access that data from the WebRequest in my handler, decode it and use it to serve the request.
To summarise, I assume you could say that a WebRequest.bodyData public property is what I am after here :).
Is there something I am missing here?
Thanks in advance for any clarification!

How can I get #abc_xyz value in url http://localhost:4032/ShowResults/id#abc_xyz in mvc?

I know I can get url in mvc using
request.url.query()
but # value is skipped can I find
#abc_xyz
value in url
http://localhost:4032/ShowResults/id#abc_xyz
Is it possible?
some work must be done:
Each time on client side, when hash changes, you should store its value in hidden input.
If this ajax request, then you can store this value in request header or in data property, and on server side analize this data.
If this simple post request to action you can analize request form values for this value.

Resources