Scrungepipes
Scrungepipes

Reputation: 37581

How can the timeout value of an NSMutableURLRequest be set in XCode?

I'm setting the timeout value of an NSMutableURLRequest in code as follows:

request.timeoutInterval = 30.0;

I'd like to be able to change this value during runtime while debugging, so tried this in the console (its for lldb):

expr request.timeoutInterval = 0.1 

but that gives:

error: property 'timeoutInterval' not found on object of type 'NSMutableURLRequest *'
error: 1 errors parsing expression

So I tried this:

expr [request setTimeoutInterval: 30.0]

But that generated:

error: no known method '-setTimeoutInterval:'; cast the message send to the method's return type error: 1 errors parsing expression

Anybody got any ideas how to change it?

Upvotes: 0

Views: 320

Answers (1)

Kadelka
Kadelka

Reputation: 46

Try this instead :

expr (NSMutableURLRequest)[request setTimeoutInterval:0.1]

Should work better :)

Upvotes: 1

Related Questions