is very useful 205 reset content
There is no new content, but the browser should reset the content it shows. Used to force the browser to clear the form input 206 partial content
The client sends a GET request with a range header, and the server completes its 300 multiple choices
Documents requested by the customer can be found in multiple locations, which are listed in the returned documents. If the server needs to give priority, it should be specified in the location response header. 301 move
an array classElse if ([jsonobject iskindofclass: [nsarray class]) {Nsarray * deserializedarray = (nsarray *) jsonobject;Nslog (@ "dersialized JSON array = % @", deserializedarray );} Else {Nslog (@ "I can't deal with it ");}}Else if (error! = Nil ){Nslog (@ "an error happened while deserializing the JSON data .");}}Else if ([jsondata length] = 0 error = nil ){Nslog (@ "no data was returned after serialization .");}Else if (error! = Nil ){Nslog (@ "an error happened = % @", error );}}Console r
(response. SC _moved_temporarily) and response. setheader ("location", URL. Note that this status code can be replaced with 301 sometimes.
303 see other: similar to 301/302. The difference is that if the original request is post, the redirection target document specified by the location header should be extracted through get.
304 not modified: the client has a buffered document and issued a conditional request (generally, the IF-modified-since header
alternative, rather than permanent. Note that the corresponding status information in HTTP1.0 is "MovedTemporatily ". When this status code appears, the browser can automatically access the new URL, so it is a very useful status code. Note that this status code can be replaced with 301 sometimes. For exampleHttp: // host /~ User(A slash is missing). Some servers return 301, while others return 302. Strictly speaking, we can only assume that the browser will automatically redirect only when the
priority, it should be specified in the Location response header.301 Moved Permanently the document requested by the customer is elsewhere. The new URL is provided in the Location header and the browser should automatically access the new URL.302 Found is similar to 301, but the new URL should be treated as a temporary alternative, rather than permanent.303 See Other is similar to 301/302. The difference is that if the original request is POST, the r
will automatically redirect only when the original request is GET. See 307. 303 See Other is similar to 301/302. The difference is that if the original request is POST, the redirection target document specified by the Location header should be extracted through GET (New in HTTP 1.1 ). 304 The Not Modified client has a buffered document and issued a conditional request (generally, the If-Modified-Since header is provided to indicate that the customer
Custom class implementation
Objective: To customize a Person class and implement copy.
First, define a Person class. Because it is a custom class, to support the copy method, you need to implement the
@interface Person : NSObject
@ Implementation Person-(id) copyWithZone :( NSZone *) zone {id p = [[self class] allocWithZone: zone] init];
Test in main. m file
Person * p1 = [[Person alloc] init]; // create the p1 object [p1 setName: @ "Michael" sex: @ "male"]; // assign the Person * p2 = [p1 c
response. sendredirect (response. the encodeurl (URL) method preplanned session tracking (session tracking) is better than calling response. sendredirect (URL) is much better. This status code can be exchanged with 301 sometimes. For example, if you mistakenly access http: // host /~ If the path information is incomplete, some servers will return the 301 status code, and some will return the 302 status code. Technically, if the initial request is a get browser, it is assumed that the browser i
original request is get. See 307.
303 see other is similar to 301/302. The difference is that if the original request is post, the redirection target document specified by the location header should be extracted through get (New in HTTP 1.1 ).
304 The not modified client has a buffered document and issued a conditional request (generally, the IF-modified-since header is provided to indicate that the customer only wants to update the doc
corresponding status information in http1.0 is "Moved temporatily ". When this status code appears, the browser can automatically access the new URL, so it is a very useful status code.Note that this status code can be replaced with 301 sometimes. For example, if the browser mistakenly requests http: // host /~ If the user (with a slash missing), some servers return 301, and some return 302.Strictly speaking, we can only assume that the browser will automatically redirect only when the original
the location header and the browser should automatically access the new URL.302 found is similar to 301, but the new URL should be treated as a temporary alternative, rather than permanent.303 see other is similar to 301/302. The difference is that if the original request is post, the redirection target document specified by the location header should be extracted through get304 The not modified client has a buffered document and issued a conditional
In the previous article, we have explained the first three methods for creating nsstring. Now we are talking about the other three methods. These three methods are also calledCreate temporary string.
The three methods are as follows:
Stringwithuf8string:Converts a C-type string to an OC string, which is similar to the initwithuf8string mentioned earlier. However, alloc is not used to create a C-type string.
Stringwithformat:Return an initialized string and some custom parameters to the
How to Use enumerated Arrays:
This involves an enumeration method, nsenumerator, which indicates that we should know what it is. If we do not know it, please check related videos or materials by yourself.
To create an array using the enumeration method, first create an immutable array with array elements.
Then, the elements in the array are printed one by one using the enumeration method.
The following is a detailed example:
#import
The output result is as follows:
2014-10-12 1
form
206 partial content the client sent a GET request with the range header, and the server completed it.
300 the documents requested by the multiple choices client can be found in multiple locations, which are listed in the returned documents. If the server needs to give priority, it should be specified in the location response header.
301 moved permanently the document requested by the customer is elsewhere. The new URL is provided in the location header and the browser should autom
as a temporary alternative, rather than permanent. Note that the corresponding status information in http1.0 is "Moved temporatily ". When this status code appears, the browser can automatically access the new URL, so it is a very useful status code. Note that this status code can be replaced with 301 sometimes. For example, if the browser mistakenly requests http: // host /~ If the user (with a slash missing), some servers return 301, and some return 302. Strictly speaking, we can only assume
use cookies on your website. This is achieved by attaching the path information at the end of each URL, but the servlet session tracking API automatically pays attention to these details. Session tracking is discussed in chapter 9 and the habit of using encodeURL makes it much easier to add session tracking later.
Core SkillsIf you direct the user to other pages of your site, use response. sendRedirect (response. the encodeURL (url) method preplanned session tracking (session tracking) is bette
browser can automatically access the new URL, so it is a useful status code. Note that this status code can sometimes be used with 301 substitutions. For example, if the browser mistakenly requests Http://host/~user (the trailing slash is missing), some servers return 301, and some return 302. Strictly speaking, we can only assume that the browser will automatically redirect only if the original request is get. See 307. 303-see other is similar
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.