, at 4:45 PM, Michael David Crawford mdcrawf...@gmail.com
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
mdcrawf...@gmail.com
http
/user
'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.
I tried this:
NSURLCredential *credential = [[WRTSServerEngine sharedServerEngine
this into an equivalent NSURLRequest that gets accepted by the
server.
I tried this:
NSURLCredential *credential = [[WRTSServerEngine sharedServerEngine]
savedCredentialsForHost:@“example.com
port
On Jul 4, 2015, at 11:04 AM, Rick Mann rm...@latencyzero.com 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
/emailpasswordSomePassWord/password/account_attributes/user
'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.
I tried this:
NSURLCredential *credential
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 04 Jul 2015, at 22:03, Jens Alfke j...@mooseyard.com 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
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
On 05 Jul 2015, at 00:45, Michael David Crawford mdcrawf...@gmail.com 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 app
On 2015 Jul 04, at 02:52, Antonio Nunes devli...@sintraworks.com 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
) ===
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 format.
I did some experimenting...
Try
On Jun 10, 2013, at 5:32 PM, Trygve Inda cocoa...@xericdesign.com 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
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* tleResponse = nil
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* tleRequest = [NSURLRequest requestWithURL
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
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 says:
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
On Jun 10, 2013, at 5:06 PM, Trygve Inda cocoa...@xericdesign.com 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
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 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
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 more straightforward
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
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.
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 the
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,
I'm building an object that communicates
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*
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
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
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 NSURLRequest
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
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
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 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 from
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
certificates
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
over what I'm doing now?
Advantages
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 over
what I'm doing now?
dkj
___
Cocoa
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
over what I'm doing now?
if it's working well
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
over what I'm doing now
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:@/principals/
__uids__/%@/\r\n
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];
[theRequest setValue: [NSString stringWithFormat
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 haroldthehun...@mac.com wrote:
Hello,
I'm having an issue with setting two headers for my NSURLRequest:
[theRequest setValue: [NSString
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 an
/];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30];
NSData *urlData;
NSURLResponse *response;
NSError *error;
urlData = [NSURLConnection sendSynchronousRequest:urlRequest
returningResponse:response error:error
/];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30];
NSData *urlData;
NSURLResponse *response;
NSError *error;
urlData = [NSURLConnection sendSynchronousRequest:urlRequest
returningResponse:response error:error
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)
Please
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? Everything but the server name
a NSURLRequest with a
NSURLRequestUseProtocolCachePolicy is adding the If-None-Match
header. Fortunately it adds the Last-Modified header automatically
so I've tweaked my server-side to be able to work just with this
header for caching.
Is this a bug in NSURLRequestUseProtocolCachePolicy
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 contents of Last-Modified and ETag headers
// ---
// 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
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 '08, at 2:21 PM, [EMAIL PROTECTED] wrote:
The Cocoa code
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.
NSMutableURLRequest *theRequest=[NSMutableURLRequest
.
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL
URLWithString:theServerURL]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0
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:
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
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 or so
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 image/jpeg
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, Mar 13, 2008 at 3:02
57 matches
Mail list logo