Comments (8)
eg: property_id=123&property_id=456
error display:
property_id: 123456
suggest:
property_id: 123
property_id: 456
from james.
Display to property_id: [123, 456]
, the most direct solution. I think the first thing is not to be misleading, the display mode can be flexible.
from james.
In the case of multiple query parameters with the same name, they're in more of an array form.
I'm thinking of having this print like:
property_id: 123,456
from james.
We came across a situation where the passed arguments are of the form but not an array.
property_id=19248&property_id=20321
NOT Like:
property_id[]=19248&property_id[]=20321
If I use array form, I won't be able to pass parameter validation, this is limited by third-party APIs.
However, this is just a display issue and does not cause any exceptions.
from james.
Ah, yes, I understand, I didn't explain properly.
I mean, if you have a URL like: http://website.com/endpoint?property_id=123&property_id=456
, then I want to display it like:
property_id: 123,456
Does that sound good?
from james.
I feel like referring to the Chrome browser example, https://www.example.com/?property_id=123&property_id=456&property_ids[]=789&property_ids[A]=000
Display:
property_id: 123
property_id: 456
property_ids[]: 789
property_ids[A]: 000
When the array becomes multi-dimensional, the situation may be more complex if merged display is used.
from james.
Hmm, good point.
Right now, our underlying proxy that provides us the data is the tool that parses the query parameters, as viewed in the docs here. It's the underlying proxy that handles ?property_id[0]=123&property_id[1]=456
and ?property=123&property=456
differently:
// hoxy
// ?property_id[0]=123&property_id[1]=456
{
'property_id[0]': 123,
'property_id[1]': 456
}
// ?property=123&property=456
{
'property_id': [123, 456]
}
We have a couple solutions to this:
- Make the adjustment so we don't join arrays improperly - so, instead of the output being
property_id: 123456
, it will be:property_id: [123, 456]
(PR #400) - Add a library that handles parsing query parameters (not a fan, since the benefit isn't much greater than the first option, and then we're shipping two query parameter parsers in James)
- The first option, then handle this directly later in #401
from james.
I've made a follow-up for this ticket, but since the core issue has been addressed, I'll close this.
from james.
Related Issues (20)
- Release of version 2.1.0 HOT 12
- Switch back to hoxy HOT 2
- Use dedicated Sentry client for Electron
- Refresh inspect-request panel if selected request becomes completed
- James auto-closes itself a few seconds after starting HOT 5
- Performance: don't send entire request list over IPC
- Solved: Run james without GUI and listen on all interface? HOT 7
- More advanced URL patterns? HOT 1
- Not Found: [email protected] HOT 3
- Create James-specific, faster web proxy [wasm]
- Make query parameter display consistent
- Solved: HTTPS access not work HOT 12
- App crashes after receiving some packets HOT 8
- How can I disable the validation check for hosts with a selfsigned certificate? HOT 3
- Import custom certificates
- Support Windows x86 HOT 1
- Allow configuring proxy for James to use HOT 7
- Export to HAR HOT 1
- https not working for my iphone, I've import root-ca.crt.pem to my phone HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from james.