Xcode send post parameters with URL
Hello Developers
How are you?
I am a new developer at all and only 2 weeks working with Objective-c. I came from VoIP PBX World, knows little bit php, shell
So my question is:
I am working right now on Bill application for mobile operator
To send parameters in a blind mode by xcode
I installed POSTER Plugin to my Firefox that can emulate login with 2 parameters (login and password) to this web site and
return me a content from my account there.
So I don't know which instrument in XCODE can do the same as POSTER PLUGIN.
I have a link where I send parameters
"https://www.golantelecom.co.il/rpc/web.account.rpc.php?action=login&p_action="
and parameters I sent
Content-type: application/x-www-form-urlencoded
username=123456&password=PASSWORD
I can't send it from my browser like a get request in this case
https://www.golantelecom.co.il/rpc/web.account.rpc.php?action=login&p_action=use rname=123456&password=PASSWORD it's not working
How I can emulate this same from Xcode?
Very appreciate for your help
Hi,
For this thing, you dnt need to use any plugin. What you can do is take the "username=123456&password=PASSWORD" text into string format. And convert that into some encoded format. Ask the server people decode the content what you are sending from device. Check the iPhone Code. May it works...
Eg:
NSMutableURLRequest *req = [[[NSMutableURLRequest alloc] init]autorelease];
[req setURL:[NSURL URLWithString:url]];
[req setHTTPMethod:kPOST];
[req setHTTPBody:[postParam dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *connGet = [[[NSURLConnection alloc]initWithRequest:req delegate:self] autorelease];
if(connGet)
NSLog(@"Connected successfully");
else {
[AppDelegate showAlert:kAlertUnableToConnect];
NSLog(@"Not connected successfully");
Thanks,
Rajesh..
Similar Messages
-
URLConnection problems(Sending parameters with URL)
Guys i have some problems with sending parameters through URL using URLConnection class.
That's my code:
URL url = new URL("http://kiosk.homebank.kz:9090/default.asp?action=SaveContact&src=C_HOMEBANK&ClientId="+request.getParameter("ClientId")+
"&IdService="+request.getParameter("IdService")+
"&Contact="+URLEncoder.encode(request.getParameter("Contact"),"utf-8")+
"&Number="+URLEncoder.encode(request.getParameter("Number"),"utf-8")+
"&Work="+URLEncoder.encode(request.getParameter("Work"),"utf-8")+
"&Mobile="+URLEncoder.encode(request.getParameter("Mobile"),"utf-8"));
URLConnection connection = url.openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);I want just send these parameters without going to this link. How can i do it using URLConnection class? Help please!Try using this set method in the URL class (query is the parameters):
protected void set(String protocol,
String host,
int port,
String authority,
String userInfo,
String path,
String query,
String ref) -
Posting parameters with Webservice class
HI,
I'm trying to use the mx.services.webservice class to
interrogate and use my .net services. Everything seems to work as
documented with the exception of passing parameters. There is
little documentation on how to pass parameters, but a few examples
seem to indicate passing an ordered list as parameters to the
method name. So my web service - GetTableOfContents expects a
string parameter - SectionName. I assumed
WS.GetTableOfContents("TheSectionName") would
accomplish this, but on inspection of the request xml
TheSectionName is not included in the xml. Below I've attached the
webservices debug/info output so you can see what I mean. Note at
the end the trace of the xml the webservice class builds for the
request and note the request bit -
<request><SectionName
/></request> with a blank parameter tag.
The parameter is being interpreted in some way by the
webservices class as you can see at 2/4 10:34:7 SOAP : parameter -
value - MySectionName, but it's not being in cluded in the xml
immediately after. Anyone seen this behaviour and know what might
be going wrong?Thankyou very much for your reply, Eric (both here and in the web services forum).
The way I generate the web service is just to right click on the java file and say 'generate web service'. I can't seem to get at the code that is generated, but it appears that there is nothing in there that I can change to rename the classes.
I may just live with it and refactor the existing client code to match the class names that are given.
Tim -
Http post to a url from a WebDynpro (Java) application
Hi,
I want to send http post parameters to a url from a WebDynpro (Java) component. I need to do this to send OCI catalog data back to SAP SRM.
I found this thread:
HTTP Post
which suggests to use the the Suspend plug for this purpose.
<quote>
Sending POST parameters with Web Dynpro Suspend Plugs
1) Define a an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map
</quote>
After adding the postParams parameter of type java.util.Map to the Suspend-plug the WebDynpro gives the following error during build:
Outbound plug (of type 'Suspend') 'suspend_plug' may have at most two parameters: 'url' of type 'string' and 'postParams' of type 'Map'.
I use SAP NetWeaver Developer Studio version 7.0.16.
Does someone know a solution? I would highly appreciate it.
Thanks in advance.
EricHi,
Please have a look at this thread,
Pass Table as Input to Adaptive RFC
Regards,
Saravanan K -
AIR auto update error, and question about POST parameters
Hello,
I'm getting a Download Failed error in the AIR autoupdating process;
There was an error downloading the update. Error# 16822
I recall this working once, the very first time that I tried it.
My app.xml file contains this line:
<version>12</version>
and my update.xml file contains:
<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
<version>12</version>
<url>http:/players.biemedia.com/ooyala/Composer/Composer.air</url>
<description>12 - Bug fixes and prepopulating defaults for player creation screen</description>
</update>
Pasting the URL into a browser works.
However, this stuffresides on cloudfront. in the past i have noticed that if something tries to send post parameters along with the request, cloudfront will deny the request. Is it possible that the AIR app is sending POST parameters when hitting the download URL, and could this behavior be new in the last 6 months or so?
Any other ideas?
Thanks,
GerryJust Got The Solution for Error 16811 & 16816
Note Following things to avoide update error
No 1.>
You xml schema for update descriptor.xml in server should look similar to this
<?xml version="1.0" encoding="utf-8"?>
<update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
<versionNumber>2.0</versionNumber>
<url>http://localhost/SerialHunter/SerialHunter.air</url>
<description><![CDATA[
SerialHunter Version 2.0 by Rajendra Khope
This new version includes:
* AutoUpdate
* Enhaced UI functions
* Ability to add providers
]]></description>
</update>
Note xmlns="http://ns.adobe.com/air/framework/update/description/2.5"
and versionNumber instead of version
Also make similar changes in appxml version field (in Burrito its by default versionNumber )
No 2>
if u are using code to display veesion number make sure it should look like:
var appXML:XML = NativeApplication.nativeApplication.applicationDescriptor;
var ns:Namespace = appXML.namespace();
pnlMain.title=appXML.ns::name+" v "+appXML.ns::versionNumber
Thats it...!
Rajendra Khope
bkrajendra at gmail dot com -
Query parameters with the same name and different values
According to HTTP, multiple query or post parameters with the
same name and different values are permitted. They are transfered
over the wire in the following format -
name1=val1&name1=val2&name1=val3
The problem is that I can't see anyway of assigning multiple
parameters with the same name and different values to the request
object of mx.rpc.http.HTTPService. I have tried using the
flash.utils.Dictionary object as it does strict key comparison but
that doesn't work too. I have tried setting an array of values to a
property of the request object but that sends the request to the
server in the following format -
name1=val1,val2,val3
The java servlet engines throw exceptions when they see this.
Any help would be greatly appreciated.If you're not on 8.1.4 move there. 8.1.3 had limitations in the wsrp
release.
wrote:
I have an html select box that contains several values, and multiple
selection is enabled. When my code runs as a remote portlet, the
following is showing up in the soap monitor when I select multiple
values and submit the form:
<urn:interactionParams>
<urn:portletStateChange>cloneBeforeWrite</urn:portletStateChange>
<urn:interactionState>_action=addEmployeesToGroup</urn:interactionState>
<urn:formParameters
name="P62005wlw-select_key:{actionForm.selectedEmployees}OldValue">
<urn:value>true</urn:value>
</urn:formParameters>
<urn:formParameters
name="P62005wlw-select_key:{actionForm.selectedEmployees}">
<urn:value>beatest1</urn:value>
</urn:formParameters>
In this case, I selected beatest1 and beatest2, but only beatest1 comes
through to the remote portlet. Is this a known bug, and, if so, is
there a patch or workaround available?
Thanks in advance,
Andy -
Passing multiple URL parameters with same name
Hi,
I have a question which is not entirely related to Java. But although its related HTTP calls, so I thought I might get some ideas here.
Background:
I am making HTTP URL call from SAP ABAP code. Its pretty much similar to Java (creating URL connection, setting HTTP headers, connecting, receiving response and everything)
For example,
http://service_server:8080/a7/extension.services.SearchRequirements.a7x?RequestStatus=CR&RequestStatus=RR
Now, this service_server runs a query to database where it uses both these values of "RequestStatus" to form 'OR' condition for a field.
Issue:
When I run this URL from browser, it shows XML response containing results for both values. In short, this is the ideal response.
(I am using getParameterValues(string) at service_server to read multiple values for same parameter)
But when I see response in SAP system, I see that it is returning data for only one value of 'RequestStatus'.
I checked the logs of service_server, and I see that it has received only one parameter, not two.
Question:
It seems like SAP systems web server is truncating both parameters with same name and passing just one of them to outside server(??)
Is there any configuration at Web Server side or any HTTP headers to be set so as to avoid this?
Can anybody suggest something on this?I managed to resolve this issue by using HTTP 'Post' method to send the data.
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
EXPORTING
URL = L_URL
IMPORTING
CLIENT = L_HTTP_CLIENT
EXCEPTIONS
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
OTHERS = 4 .
"STEP-2 : AUTHENTICATE HTTP CLIENT
CALL METHOD L_HTTP_CLIENT->AUTHENTICATE
EXPORTING
USERNAME = 'name'
PASSWORD = 'password'.
"STEP-3 : SET HTTP HEADERS
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING NAME = 'Accept'
VALUE = 'text/xml'.
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING NAME = '~request_method'
VALUE = 'POST' .
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_CONTENT_TYPE
EXPORTING CONTENT_TYPE = 'application/x-www-form-urlencoded' .
"SETTING REQUEST DATA FOR 'POST' METHOD
IF L_PARAMS_STRING IS NOT INITIAL.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = L_PARAMS_STRING
IMPORTING
BUFFER = L_PARAMS_XSTRING
EXCEPTIONS
FAILED = 1
OTHERS = 2.
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_DATA
EXPORTING DATA = L_PARAMS_XSTRING .
ENDIF.
"STEP-4 : SEND HTTP REQUEST
CALL METHOD L_HTTP_CLIENT->SEND
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2.
"STEP-5 : GET HTTP RESPONSE
CALL METHOD L_HTTP_CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3.
"STEP-6 : READ RESPONSE DATA
CALL METHOD L_HTTP_CLIENT->RESPONSE->GET_CDATA
RECEIVING DATA = L_RESULT .
"STEP-7 : CLOSE CONNECTION
CALL METHOD L_HTTP_CLIENT->CLOSE
EXCEPTIONS
HTTP_INVALID_STATE = 1
OTHERS = 2 .
{code} -
Encoding problem in call-back to hook URL (post parameters)
Hello all,
I'm encountering a character encoding problem while retrieving the content of the shopping basket from one of our provider.
After the POST request is made by the provider to our system using the hook url, when debbuging I can see that some special characters are represented with the sign '#' (after the call the ITS_IMPORT_CONTEXT).
In our case using the parameter http_content_charset with various values, including UTF-8, did not change the result.
Inspecting the HTTP traffic has highlighted the following: the encoding received from the provider is related to UTF-8, but while we are expecting the hexadecimal values, we are receiving the "Unicode code points", which are not recognized by our SAP system. For more details look at the UTF-8 encoding table found here and compare the values under column "Unicode code point" with the one under column "UTF-8 (hex.)".
As an example, for the character 'é', we are receiving the value "%E9" (the code point) instead of receiving the the hexa value : "%C3%A9".
Do you have any idee if this can be corrected on our side or if the provider must addapt the way it's sending the POST parameters?
Many thanks in advance for you help.
Best regards,
Jerome.Hi Jason,
Indeed I had contacted the provider and informed them about the encoding problem and the fact that passing the parameter http_content_charset had no effect on the sent back encoding.
They have taken into account my request and have changed the encoding used during the request to the HOOK_URL.
Thanks to all of your for your help.
Regards,
Jerome. -
Help in passing parameters along with URL
Hi All,
I have a small web application in which I am passing some details to a servlet along with url.
http://localhost:8080/Test/orderDetails.do?OID-67856
When I am checking req.getParameterNames(),I am able to see paramname 'OID-67856'
in Jboss .But not able to see the same in WAS .What is the exact pattern we need to follow when we pass parameters?
Do we strictly need to follow paramName=paramValue pattern in order to work this on all application servers?
It will be great if someone share me any specification documents regarding this .
Thanks in advance.798185 wrote:
Hi All,
I have a small web application in which I am passing some details to a servlet along with url.
http://localhost:8080/Test/orderDetails.do?OID-67856
When I am checking req.getParameterNames(),I am able to see paramname 'OID-67856'
in Jboss .But not able to see the same in WAS .What is the exact pattern we need to follow when we pass parameters?
Do we strictly need to follow paramName=paramValue pattern in order to work this on all application servers?
It will be great if someone share me any specification documents regarding this .
Thanks in advance.Well, try turning it into ?OID-67856= (so an empty value) and see if it starts to work on WAS. Would have been a test of a few seconds, posting this question took you at least a minute.
If even after trying it out you want hard proof, you should check the HTTP specifications (google for 'rfc http'). -
Capturing a dynamic swf with url parameters?
Hi,
I'm wondering if it's possible for users to capture an swf
with URL variables?
for example ->
www.somesite.com/foo.swf?param1="value"¶m2=value"
normal swf rippers will catch only the base "naked" swf, but
is there a way to fully capture the whole flash object after it has
rendered the parameters?
(for example, if it's an ad, the full ad with all the
elements will be captured)
this can help me to quickly generate demo stand-alone
instances for some apps i'm building, instead of compiling them
separatelyoops...sorry for double posting..
-
Send streaming password with GET or POST
hi!
we are using a plugin for protools which outputs a quicktime stream for our clients during recording sessions. this stream is password protected. since the client hearing/viewing this stream is already on a password protected site it would be nice to automatically log the user in the stream (to avoid that she has to enter user/passw a second time).
is it possible to send the password with GET or POST (or another approach) to the quicktime plugin?
unfortunately it is necessary to password-protect the stream since the url is always the same and another client could use the url to peep into the session.
thanks in advance
joerghi!
we are using a plugin for protools which outputs a quicktime stream for our clients during recording sessions. this stream is password protected. since the client hearing/viewing this stream is already on a password protected site it would be nice to automatically log the user in the stream (to avoid that she has to enter user/passw a second time).
is it possible to send the password with GET or POST (or another approach) to the quicktime plugin?
unfortunately it is necessary to password-protect the stream since the url is always the same and another client could use the url to peep into the session.
thanks in advance
joerg -
How to make the report run with urls supplied parameters
I have a report that I send the report's parameters by URL.
How can I make the report automatically run with the parameters supplied?
So when the report opens the user does NOT have to click the "View Report" button the report would just run and display the results for the user?
Thank you for you help.Take your iPad to the apple store and explain your problem. They won't make you sit there for an hour to reproduce the problem. I took an iPad back a month ago wit h screen problems. They didn't look at the problem, they just exchange it.
Again, Apple won't make you stand on your head to reproduce a problem with one of. their produces. -
How can I send a post query with attached data using Labview?
Hi,
I need to send data (a file of 5KB) to a php server.
In order to do it, I need to send a post request with attached data.
I'm using Labview 6.1 and I have the Internet Toolkit.
But I just see the Get Method. Isn't implemented the post method in Labview?
Thanks for your help
Best regardsHi,
In order to use the POST request method as opposed to the GET request method I used a VI set up as shown in the attached GIF.
From the front panel you need to provide values for the 3 inputs. "Bytes to read" is an arbitrarily large number that meets or exceeds the maximum number of bytes you expect as a response from your server. "Address" is just the URL of the server, e.g. "10.90.1.1" or "localhost" or "www.google.com". "Data in" is the actual request you're sending with the data included.
"Data in" would be in a format similar to everything in the quotes below (important to have 2 carriage returns to finish the request);
POST /phppage.php HTTP/1.1
Content-Length: ??
Host: http://www.mywebserver.com
Content-Type: application/x-www-form
-urlencoded
email=[email protected]&password=mypassword
For sending your data file you just have to set the requisite MIME-type and then include the file data in place of the form data in the example above.
Hope this helps,
Neil
Attachments:
LV_TCP_code.gif 4 KB -
Start IC WebClient with URL Parameters
Hi,
we are currently implementing IC WebClient 5.0. One of the customer needs is it, to start the IC WebClient with a service order ID, so that the order is displayed immediately without searching and confirming an account. Is it possible to start the IC WebClient with URL parameters to solve that issue?
Thank you for you help in advance!
Marcus WalenaHallo Marcus,
This is currently not possible.
However, you don't need to always confirm the customer. You can use the agent inbox to do the search and navigate directly to the service order. However, if you want to do any processing after that, then you will need to identify the customer. The other option is to implement this yourself.
BTW: It is possible to navigate via a URL to the service order directly using PC UI.
Regards,
Shiv -
How To Pass Multiple Parameters In URL with Report Builder
Hi,
I use apex 4.2 with database xe 11g and i use report builder to build my report i use this link to call report
function runrep(){
var vurl = 'http://192.168.0.57:8889/reports/rwservlet?userid=retail/1@xe&destype=cache&desformat=PDF¶mform=no&report=item_cost&P_BATCH_NO='+$v('P138_BATCH_NO');
popupURL(vurl);
now i want to pass Multiple Parameters like P138_ITEM_CODE , P138_UOM_CODE
how can i add this Parameters in URL ?
Regards
AhmedRamani_vadakadu wrote:
window.open("http://hq-orapp-03.kuf.com:9704/xmlpserver/~weblogic/kufpec/BTA/KUF_CONF_ITINUD.xdo?_xpf=&_xpt=1&_xdo=%2F~weblogic%2Fkuf%2FBTA%2FKUF_CONF_ITINUD.xdo&_xmode=&_paramsP_BTM_ID="+parseInt(document.getElementById('P3_BTA_ID').value)+"&_xt=KUF_CONF_ITINUD&_xf=pdf&_xautorun=true&id=weblogic&passwd=kuf2011","_blank");
the above code we are using apex JS to BI publisher calling for report as PDF
i don't know exactly where your parameters , did you customize my link to multiple parameters
'http://192.168.0.57:8889/reports/rwservlet?userid=retail/1@xe&destype=cache&desformat=PDF¶mform=no&report=item_cost&P_BATCH_NO='+$v('P138_BATCH_NO');
Maybe you are looking for
-
Brand new iMac i7 restarts for no reason while using FCP
I have had my iMac i7 for less than a month. I am having the same issue... The computer blanks and restarts with no warning whatsoever. This is happening while editing/playing back video in Final Cut Pro 6.0.6. It is a multicam edit – 5 streams of 12
-
How to reschedule a Back ground job in Normal ABAP from Web Dyn Pro abap application??
Hi Experts, How to reschedule a Back ground job in Normal ABAP from Web Dyn Pro abap application??
-
Do InDesign table fields convert to form fields for interactive PDFs?
Does InDesign CC recognize table fields as form fields when creating fillable form PDFs - or do I have to create individual text fields on top of the InDesign table and assign form field text field characteristic in the buttons and forms menu?
-
App store tells me that 8 apps haven't been downloaded. Any ideas or suggestions
-
How do i restore do not ask me again box?
I've accidentally checked the do not ask me again again box when I wanted to delete a photograph. I,d like to get it back if anyone can help please?