-
Notifications
You must be signed in to change notification settings - Fork 18
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
BridgeServer does not support URL/GET variables #33
Comments
I did a patch in 1.2.10 (https://www.npmjs.com/package/react-native-http-bridge-refurbished/v/1.2.10). |
Hi. Sure I will be testing out |
hi @Alwinator After installing the
I am getting this output:
is there a way for me to get the url params given the this curl request?
I don't think i can do something with the Thank you very much. |
@silencer07 Sorry, I forgot to pass the parameters. Please try |
Hi @Alwinator, basically i tried using this snippet
i tried doing curl -X GET -H "Content-Type: application/json" http://192.168.254.112:30000/foo\?hello\=hi However I am getting this log
so two issues:
P.S. I checked the code in the node_modules folder but I am not seeing the |
@silencer07 That is very weird, because on npm there is the latest code in: https://www.npmjs.com/package/react-native-http-bridge-refurbished/v/1.3.1?activeTab=code Can you check out your node_modules folder if the bridgeServer.js file includes the getData attribute? I will do the TypeScript types once that works. |
@Alwinator alright will test. maybe I will delete the node_modules folder of the library to force it to redownload again |
@Alwinator I am seeing this code in
but same output, getData is undefined. maybe there is something wrong with the published code |
@silencer07 Okay, I thought I can write it out of my mind. I need to setup React Native again. I hope I have time for that soon. Then, I will take a look at it. Thanks for testing. :) |
@Alwinator the fix is just let the url object be passed as it is and we can use i.e.
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams |
@silencer07 I know that URLSearchParams are available in ReactJS, but are they also available in React Native? |
Definitely! we can use the latest ecma version(even bleeding edge) as long as it is supported by hermes itself(at least if you don't opt out of it) If RN does not support it just in case, I think it won't be your problem as it is easy to create a key-value pair parser out of url string :D |
Sorry I entered too fast. Basically if you pass the raw url with the url params, that's it. It is up to the consumer of your library to handle it :) |
@silencer07 However, if you find another solution, feel free to submit a pull request that would speed it up! ;) |
@Alwinator fine with me. same predicament I am still busy productionizing my hobby app :D Will definitely do! |
🎉 This issue has been resolved in version 1.3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@silencer07 I now had the time to actually test my code xD |
@Alwinator i checked the commit, are you already passing the url as it is? It is fine if getData won't be supported in iOS but at least I think I will need the raw url so I can do manipulations with it. |
@silencer07 No I am passing the getData directly from the native Android Code. |
Basically I am trying to workaround issue #32
I am appending the fields as URL params:
however it seems that the server stopped responding anymore. I encountered this problem when the url path is wrong (i.e.
/songsWrongPath
instead of/songs
)The text was updated successfully, but these errors were encountered: