n Jul 4, 2015, at 4:45 PM, Michael David Crawford
> wrote:
>
> Would it work to use libcurl instead?
>
> I dont know but would be unsurprised were that to be what NSURLRequest
> actually does.
>
>
> --
> Michael David Crawford, Consulting Software Engineer
>
On 04 Jul 2015, at 22:03, Jens Alfke wrote:
>
> (Sending a GET request with a body is pretty unusual, but I assume that’s
> what the server wants since you say the curl command works…)
Yes, I’m not happy about this, and I think this is also what is causing the
issue, since it looks like the bo
> On 05 Jul 2015, at 00:45, Michael David Crawford wrote:
>
> Would it work to use libcurl instead?
>
> I dont know but would be unsurprised were that to be what NSURLRequest
> actually does.
Probably, but this is on iOS, so I would have to package a libcurl build into
the
...@example.comSomePassWord"
>> 'https://example.com/api/v1/endpoint
>>
>> The -d and xml-string are mandatory for this GET command. I haven’t been
>> able to translate this into an equivalent NSURLRequest that gets accepted by
>> the server.
>
Thanks for the pointer to macnetworkprog Jerry, and for the link to Charles. I
should probably have mentioned in my post that this is an iOS app, not a Mac
app. Would that matter for macnetworkprog, or is the list appropriate for iOS
too?
António
> On 04 Jul 2015, at 13:59, Jerry Krinock wrot
Would it work to use libcurl instead?
I dont know but would be unsurprised were that to be what NSURLRequest
actually does.
--
Michael David Crawford, Consulting Software Engineer
mdcrawf...@gmail.com
http://www.warplife.com/mdc/
Available for Software Development in the Portland, Oregon
> On Jul 4, 2015, at 11:04 AM, Rick Mann wrote:
>
> FWIW, you're setting the Accept header, not Content-Type (nor
> Accept-Language).
Yup. And I’m pretty sure you [the OP] don’t want to add that Accept header to
all requests, since it’s telling the server to give up (with a 406 status) if
th
Content-Type:
> application/xml; charset=utf-8' -H 'Accept-Language: en' -d
> "y...@example.comSomePassWord"
> 'https://example.com/api/v1/endpoint
>
> The -d and xml-string are mandatory for this GET command. I haven’t been able
> to translate
> On 2015 Jul 04, at 02:52, Antonio Nunes wrote:
>
> Is there a way to see exactly what the request looks like when it goes out?
Search for “OS X Packet Sniffer” and you will find many apps for this, and even
some stuff built into OS X, which are quite fun to use. My favorite (because
it can
om/api/v1/endpoint
The -d and xml-string are mandatory for this GET command. I haven’t been able
to translate this into an equivalent NSURLRequest that gets accepted by the
server.
I tried this:
NSURLCredential *credential = [[WRTSServerEngine sharedServerE
On Jun 10, 2013, at 5:32 PM, Trygve Inda wrote:
> http://www.celestrak.com/NORAD/elements/stations.txt
The JavaScript redirect you showed earlier appears to be that server's broken
attempt to display a "page not found" error. Note the Content-Location header
with "404" in it.
Perhaps the file
:
=== (1) ===
Try setting the NSURLRequest to request *only* "text/plain",
(Noticing how safari gets back "text/plain" mime type, but your cocoa
app got back a (garbled) HTML.
The result you got looks like untested code in the server for
wrapping plain text into html form
On Jun 10, 2013, at 5:06 PM, Trygve Inda wrote:
> However, on some customer's systems, despite NSError not showing anything
> wrong, I get:
That’s a web page with a pretty clumsy way of redirecting to
`/redirect.asp?loc=` followed by the actual URL. I have no idea why someone
would do this in
> Well, that's it, isn't it?
>
>
> On Jun 10, 2013, at 8:32 PM, Trygve Inda wrote:
>
>>> What is the header of the file being fetched set to?
>>>
>>> On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote:
>>
>> I believe it is just a plain text file. Safari will not allow me to view
>> source on the
Well, that's it, isn't it?
On Jun 10, 2013, at 8:32 PM, Trygve Inda wrote:
>> What is the header of the file being fetched set to?
>>
>> On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote:
>
> I believe it is just a plain text file. Safari will not allow me to view
> source on the page and FireFox
> What is the header of the file being fetched set to?
>
> On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote:
I believe it is just a plain text file. Safari will not allow me to view
source on the page and FireFox says:
text/plain
ISO-8859-1
FireFox also says:
The character encoding of the plain
What is the header of the file being fetched set to?
On Jun 10, 2013, at 8:06 PM, Trygve Inda wrote:
> I am using the following code (url changed, but it is a .txt file)
>
> NSString* tleAddress = @"http://www.somesite.com/somefile.txt";;
>
> NSURLRequest* t
I am using the following code (url changed, but it is a .txt file)
NSString* tleAddress = @"http://www.somesite.com/somefile.txt";;
NSURLRequest* tleRequest = [NSURLRequest requestWithURL:[NSURL
URLWithString:tleAddress] cachePolicy:0 timeoutInterval:5.0];
NSURLResponse* tleResp
On 2011 Sep 14, at 10:21, lcerveau wrote:
> - At the same time I use a software like HTTPScoop to look on how it is
> timing all this. Time are always différent like 0.05 seconds.
I'm not familiar with HTTPScoop, but 50 milliseconds is typical for a single
ping on the internet.
>
> So nearly
Hi
I have a question regarding time a NSURLRequest/NSURLConnection is taking : I
do the following
- When creating/launching the request I take a timestamp, in the delegate
method
- (void)connection:(NSURLConnection *)connection
didReceiveResponse:(NSURLResponse *)response
I take another one
On 16 May 2011, at 03:57, Larry Campbell wrote:
> Seems odd to me that setting and getting properties of an NSURLRequest
> involve an NSURLProtocol class method:
>
>+[NSURLProtocol setProperty:forKey:inRequest:]
>
> rather than what seems to me the much mo
Seems odd to me that setting and getting properties of an NSURLRequest involve
an NSURLProtocol class method:
+[NSURLProtocol setProperty:forKey:inRequest:]
rather than what seems to me the much more straightforward:
-[NSMutableURLRequest setProperty:forKey:]
Is there a reason for
On 18 Jan 2010, at 16:37, Clint Shryock wrote:
> I had the same issue in the past using NSOperationQueue and NSURLConnection,
> and I resolved it by simply telling NSURLConnection to send using
> synchronously using sendSynchronousRequest:returningResponse:error:
>
> Would that not take care of
I had the same issue in the past using NSOperationQueue and NSURLConnection,
and I resolved it by simply telling NSURLConnection to send using
synchronously using sendSynchronousRequest:returningResponse:error:
Would that not take care of the issue?
+Clint
On Sun, Jan 17, 2010 at 1:55 PM, J. Sco
The issue that Dave has run into is that when you call the asynchronous
NSURLConnection call, NSURLConnection looks to see what thread you are calling
it on, and it will only call your delegate back on that Thread (if it exists).
If you exit your NSOperation main method, your thread is going to
Thanks for the responses! It hadn't occurred to me to spin the runloop myself.
My main reason for using an NSOperationQueue for the connections was because
the spawner of the connections was also the connection delegate, and it
would've taken some interesting code dancing to handle the delegate
> Solution 1 would be to have you do a synchronous NSURLConnection in your main
> method. This will show you everything is working in that thread and that you
> do indeed get data back from your server.
This isn't a good idea since it limits the cancelabilty of your operation.
> NSRunLoop* cur
urrentRunLoop runUntilDate:dateLimit];
}
// 3. Report your results to your main thread!
...
}
Scott Tury
On Jan 17, 2010, at 12:08 AM, cocoa-dev-requ...@lists.apple.com wrote:
> Subject: NSURLRequest and NSOperationQueue
>
> Hi everyone,
>
>
Hi everyone,
I'm building an object that communicates with a server. For various reasons,
I'd like to queue up all the NSURLRequests in an NSOperationQueue so that I
never have more than one connection open at a time.
However, I'm running into a weird issue. If I create my N
On 16 Oct 2009, at 15:52, Greg Hoover wrote:
It's signed by Verisign. Where does NSURLRequest and its supporting
routines find the CA root certs?
Are you sure it's the root certificate that it needs and not some
certificate beneath that? Some CAs sign their SSL certs with
ce
On Oct 16, 2009, at 7:52 AM, Greg Hoover wrote:
It's signed by Verisign. Where does NSURLRequest and its supporting
routines find the CA root certs?
In the Keychain. You can see the list of pre-installed root certs by
launching Keychain Access and selecting "System Roots
On Oct 16, 2009, at 1:13 AM, Andrew Farmer wrote:
On 16 Oct 2009, at 00:48, Greg Hoover wrote:
I have the same piece of code making a secure request to a server
in a Mac application and in an iPhone app. Both use an
NSURLRequest with exactly the same settings, message, body, etc.
On
On 16 Oct 2009, at 00:48, Greg Hoover wrote:
I have the same piece of code making a secure request to a server in
a Mac application and in an iPhone app. Both use an NSURLRequest
with exactly the same settings, message, body, etc. On the Mac, the
request succeeds, returning the data
I have the same piece of code making a secure request to a server in a
Mac application and in an iPhone app. Both use an NSURLRequest with
exactly the same settings, message, body, etc. On the Mac, the
request succeeds, returning the data expected. On the iPhone however,
the request
*myArray = [NSArray arrayWithContentsOfURL:url];
which has been working just fine so far.
But now I'm reading through the "URL Loading System" docs, and
wondering if I should be using all the NSURLRequest stuff instead.
It's more complicated, so are there any advantages it would have
o
*myArray = [NSArray arrayWithContentsOfURL:url];
which has been working just fine so far.
But now I'm reading through the "URL Loading System" docs, and
wondering if I should be using all the NSURLRequest stuff instead.
It's more complicated, so are there any advantages
*myArray = [NSArray arrayWithContentsOfURL:url];
which has been working just fine so far.
But now I'm reading through the "URL Loading System" docs, and
wondering if I should be using all the NSURLRequest stuff instead.
It's more complicated, so are there any advantages it would have
ov
ich has been working just fine so far.
But now I'm reading through the "URL Loading System" docs, and
wondering if I should be using all the NSURLRequest stuff instead.
It's more complicated, so are there any advantages it wou
Hi, Chris,
I had a similar problem the other day. Are you using an
NSMutableURLRequest?
Doug K;
On Tue, Jun 2, 2009 at 2:44 AM, Chris wrote:
> Hello,
>
> I'm having an issue with setting two headers for my NSURLRequest:
>
>[theRequest setValue: [NSString
On 1 Jun 2009, at 23:44, Chris wrote:
I'm having an issue with setting two headers for my NSURLRequest:
[theRequest setValue: [NSString stringWithFormat:@"/principals/
__uids__/%@/\r\n",self.userGUID] forHTTPHeaderField:@"Originator"];
[theRe
Hello,
I'm having an issue with setting two headers for my NSURLRequest:
[theRequest setValue: [NSString stringWithFormat:@"/principals/
__uids__/%@/\r\n",self.userGUID] forHTTPHeaderField:@"Originator"];
[theRequest setValue: [NSString stringWithFormat
On Fri, May 29, 2009 at 4:10 PM, Chris Purcell wrote:
> Hello,
>
> I'm trying to issue a "REPORT" request to a server, the HTTP Method header
> needs to look like this:
>
> REPORT /bernard/work/ HTTP/1.1
>
> So I use setHTTPMethod to set the HTTP Method: [theRequest
> setHTTPMethod:@"REPORT /berna
Hello,
I'm trying to issue a "REPORT" request to a server, the HTTP Method
header needs to look like this:
REPORT /bernard/work/ HTTP/1.1
So I use setHTTPMethod to set the HTTP Method: [theRequest
setHTTPMethod:@"REPORT /bernard/work/"];
But when I issue the request, the server returns a
s.com/v2/
json/"];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30];
NSData *urlData;
NSURLResponse *response;
NSError *error;
urlData = [NSURLConnection sendSynchronousRequest:urlRequest
returningResp
s.com/v2/
json/"];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30];
NSData *urlData;
NSURLResponse *response;
NSError *error;
urlData = [NSURLConnection sendSynchronousRequest:urlRequest
returningResp
On Mon, Oct 20, 2008 at 2:19 PM, Robert Mullen <[EMAIL PROTECTED]> wrote:
> When sending a NSURLRequest to an secure website via NSURLConnection will
> the initial URL be encrypted or only the response? I have looked around at
> Apple's docs and am unclear.
An HTTPS URL? Every
When sending a NSURLRequest to an secure website via NSURLConnection
will the initial URL be encrypted or only the response? I have looked
around at Apple's docs and am unclear.
Thanks
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
P
the contents of "Last-Modified" and ETag" headers from
the last server's answer. However it doesn't look like a
NSURLRequest with a NSURLRequestUseProtocolCachePolicy is adding
the "If-None-Match" header. Fortunately it adds the "Last-Modified"
he
ers from the last
server's answer. However it doesn't look like a NSURLRequest with a
NSURLRequestUseProtocolCachePolicy is adding the "If-None-Match"
header. Fortunately it adds the "Last-Modified" header automatically
so I've tweaked
Some weird things seem to happen with NSURLRequest when used with
NSURLRequestUseProtocolCachePolicy :
1)
The documentation I've found about "Conditional GET" in the web says I
should be sending "If-Modified-Since" and "If-None-Match" headers with
the c
// ---
// 4) Convert Synchronous Data into Human-Readable String
(Unicode 8) format:
NSString *serverDataString = [[[NSString alloc]
initWithData:serverData encoding:NSUTF8StringEncoding] retain];
This is an extra retain.
[[soapResponse layoutManager
// 2) Create the request.
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL
URLWithString:theServerURL]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
//
pathForResource:@"sms"
> ofType:@"xml"];
>self.smsXMLString = [NSString stringWithContentsOfFile:smsXMLPath
> encoding:NSUTF8StringEncoding error:myError];
Use &myError
> // -------
>// 2) Create the request.
>NSURLRequ
I needed to modify the default 'GET' Response of the NSURLRequest to a 'POST'...
So I changed 'NSURLRequest' to a 'NSMutableURLRequest' to modify the HTTPMethod:
// ---
// 2) Create the request.
NSMutableURLR
ing the SYNCHRONOUS
connection
to the server is the source...
Does NSURLRequest need to be CLOSED before exit?
I don't remember seeing NSURLRequest closer in the doc.
Any ideas/remedies for the EXC_BAD_ACCESS (SIGBUS)?
Ric.
On 05/15/2008 17:56 Jens Alfke wrote ..
>
> On 15 May
On 15 May '08, at 2:21 PM, [EMAIL PROTECTED] wrote:
The Cocoa code below "works". I get data back from the server.
However, I'm unable to QUIT this application after this particular
routine passes through. I checked the Activity Monitor and can see
a bunch of threads still in session
S SOAP envelope, without
the .
NSString *smsXMLPath = [[NSBundle mainBundle] pathForResource:@"sms"
ofType:@"xml"];
self.smsXMLString = [NSString stringWithContentsOfFile:smsXMLPath
encoding:NSUTF8StringEncoding error:myError];
// ---
On Fri, Mar 14, 2008 at 12:43 AM, Ben Lachman <[EMAIL PROTECTED]> wrote:
> I do this with a perl script on the back end. My experience was that
> its was more cajoling the perl script into working that the PHP side,
> but that may be because I'm not much of a perl wizard (maybe only
> level 8 o
I do this with a perl script on the back end. My experience was that
its was more cajoling the perl script into working that the PHP side,
but that may be because I'm not much of a perl wizard (maybe only
level 8 or so :-). I found it was important to declare a filename if
you're transfer
Also, for what it's worth, I can hit the server just fine at the
command line with:
curl -F "[EMAIL PROTECTED];filename=7195554321_1_20080311132327_jpg"
http://server:8080/php/post.php
...yet for some reason the NSURLRequest approach fails. Any/all tips
are welcome.
On Thu, Ma
On Thu, Mar 13, 2008 at 2:50 PM, Tom Harrington <[EMAIL PROTECTED]> wrote:
> [postBody appendData:[[NSString stringWithString:@"Content-Type:
> null\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
Someone asked about this. FYI, "null" is what the other clients use,
but if I use "imag
I'm trying to upload a file with the NSURL* API, but on the server end
the PHP code is unable to decode the $_FILES array. The PHP code
works fine when posted from an HTML form (and from clients on other
platforms).
Traffic sniffed on the wire looks good as far as I can tell, so what
would be the
62 matches
Mail list logo