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
Passing Paramenter in Tron Request #30
Comments
You should initialize TRON with baseURL |
Hmm, well first of all it seems your path is And i think for POST request by default parameters get encoded into HTTP body, not HTTP query, so if you really need POST request with parameters in query, you would need to change parameterEncoding property on |
Thanks for quick reply
PageNo and PageSize are base64 encoded
and a token is the normal string
and how I can do this *"**parameters in the query"*
*Ehsan-ul-haq*
----------------------------------------------------
(Software & Web Development)
IPhone Android Nokia (Development)
3D Animation Services
+923232430139
http://www.iehsan.com
https://www.linkedin.com/in/iehsan/
<http://www.linkedin.com/profile/view?id=39199691&trk=tab_pro>
http://www.facebook.com/iehsan
…On Thu, Mar 23, 2017 at 1:05 PM, Denys Telezhkin ***@***.***> wrote:
Hmm, well first of all it seems your path is MvcSmartDevice/
GetFeaturePearlQuery, and not GetCategories, like it says in code.
Second, maybe inspect your API, it does not look like PageNo and PageSize
are valid parameters, usually there are numbers, not stuff like MTA=.
Third, are you sure you need a POST request? Usually such kind of requests
are GETs.
And i think for POST request by default parameters get encoded into HTTP
body, not HTTP query, so if you really need POST request with parameters in
query, you would need to change parameterEncoding property on APIRequest.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACvv9Q63n76oiSEHLp8bqsSVWeKcpVAfks5roifIgaJpZM4MlpER>
.
|
What are those symbols for? |
Sorry, I can't understand your question.
? Is using in actual is used in the actual URL as a query
*Ehsan-ul-haq*
----------------------------------------------------
(Software & Web Development)
IPhone Android Nokia (Development)
3D Animation Services
+923232430139
http://www.iehsan.com
https://www.linkedin.com/in/iehsan/
<http://www.linkedin.com/profile/view?id=39199691&trk=tab_pro>
http://www.facebook.com/iehsan
…On Thu, Mar 23, 2017 at 1:33 PM, Denys Telezhkin ***@***.***> wrote:
What are those symbols for? *
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACvv9Rw7ZPxfvo_6FPMXtBR-5RmUbcWoks5roi5ugaJpZM4MlpER>
.
|
tron.headerBuilder = HeaderBuilder(defaultHeaders: [:]) |
do you mean
tron.headerBuilder = HeaderBuilder(defaultHeaders: ["token":
"f6b8a88b-6939-4bd6-a3f6-589020beb35d"])
like this ?
*Ehsan-ul-haq*
----------------------------------------------------
(Software & Web Development)
IPhone Android Nokia (Development)
3D Animation Services
+923232430139
http://www.iehsan.com
https://www.linkedin.com/in/iehsan/
<http://www.linkedin.com/profile/view?id=39199691&trk=tab_pro>
http://www.facebook.com/iehsan
…On Thu, Mar 23, 2017 at 1:44 PM, Popeye Lau ***@***.***> wrote:
tron.headerBuilder = HeaderBuilder(defaultHeaders: [:])
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACvv9USpA7esYWFl2SJcB7WuAdievqJnks5rojDVgaJpZM4MlpER>
.
|
@iehsan77 you wrote this:
And i didn't understand, what |
HeaderBuilder is used to encode headers for HTTP request, but in your URL it looks like you need to pass token in HTTP query, not headers. In that case you don't need to pass token to HeaderBuilder, but use parameters on APIRequest. |
You should build it up like this
|
thanks, I appreciate your help
*Ehsan-ul-haq*
----------------------------------------------------
(Software & Web Development)
IPhone Android Nokia (Development)
3D Animation Services
+923232430139
http://www.iehsan.com
https://www.linkedin.com/in/iehsan/
<http://www.linkedin.com/profile/view?id=39199691&trk=tab_pro>
http://www.facebook.com/iehsan
…On Wed, Mar 29, 2017 at 2:51 PM, reshadf ***@***.***> wrote:
You should build it up like this
let request: APIRequest<Model, Error> = tron.request("url")
request.parameters = ["token":token, "id": id]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACvv9agLAwxCRlj-pC9WJXspdPwcMRzxks5rqim2gaJpZM4MlpER>
.
|
hi
with TRON - > how to use this URL (https://www.sampledomain/Device/GetFeature?token=f6b8a88b-6939-4bd6-a3f6-589020beb35d&PageNo&MQ==&PageSize=MTA=)
The text was updated successfully, but these errors were encountered: