REST प्रोटोकॉल क्या है और यह HTTP प्रोटोकॉल से क्या भिन्न है?
<
-
/ Ul>
डेटा यूआरएल के द्वारा विशिष्ट रूप से संदर्भित है और एचटीएमएच ऑपरेशन (GET, PUT, POST, DELETE, आदि) का उपयोग करने पर कार्य किया जा सकता है। माइम प्रकार की एक विस्तृत विविधता संदेश / प्रतिक्रिया के लिए समर्थित होती है लेकिन XML और JSON सबसे आम हैं।
उदाहरण के लिए एक ग्राहक के बारे में डेटा पढ़ने के लिए, आप URL के साथ एक HTTP प्राप्त कार्य का उपयोग कर सकते हैं। यदि आप उस ग्राहक को हटाना चाहते हैं, तो उसी URL के साथ ही HTTP हटाएं कार्रवाई का उपयोग करें।
नीचे दिए गए जावा कोड HTTP प्रोटोकॉल पर एक अस्थाई कॉल बनाने का तरीका दर्शाता है:
< कोड> स्ट्रिंग uri = "http://www.example.com/customers/1"; यूआरएल यूआरएल = नया यूआरएल (यूरी); HttpURL कनेक्शन कनेक्शन = (HttpURL कनेक्शन) url.openConnection (); connection.setRequestMethod ( "GET"); Connection.setRequestProperty ("स्वीकार करें", "एप्लिकेशन / एक्सएमएल"); JAXBContext जेसी = JAXBContext.newInstance (ग्राहक.क्लाश); InputStream xml = connection.getInputStream (); ग्राहक ग्राहक = (ग्राहक) jc.createUnmarshaller ()। Unmarshal (xml); connection.disconnect (); उदाहरण के लिए जावा (जेएक्स-आरएस) उदाहरण देखें:
Popular posts from this blog
I registered my receiver for receiving SMS when I receive the SMS, how do I execute the phone's default SMS app Can i do Can I send the intention to start the default SMS app? This can be done in a few different ways. Here's one: Send intentions = new intent (int. Action_viez); SendIntent.putExtra ("sms_body", "The content of the SMS goes here ..."); SendIntent.setType ("vnd.android-directory / MMS-SMS"); StartActivity (sendIntent);
I have to get the essential CSS property of the element (the property can be inherited from her parents) Standart Jquery .css () can do this. I have such an HTML: & Lt; Span id = "something" & gt; Our element & lt; / Span & gt; & Lt; Br> Some text & lt; / Div & gt; & Lt; Div id = "result" & gt; & Lt; / Div & gt; CSS: #some {font-weight: bold; } # Containers {text-decoration: underline; Color: RGB (0,255,0); Font-size: 32px; } and jQuery code: $ (function () {var decor = $ ("#some") .css ('text-decoration' ) Weight Weight = $ ("#Additional"). CSS ('font-weight'); var color = $ ("#some"). CSS ('color'); var size = $ ("#some") Css ('font-size'); var result = " Our object's own property: Font-weight: "+ weight +" & gt; hereditary property: & lt; / b & gt; & lt; br & gt; ; & Lt; br ...
I'm trying to create a predefined key after checking the manual and I wrote it: Db.execute ("create table" Table 2 (id, integer primary key, somedata integer) "db.execute" (table creation table 2 does not exist (name text, maintain reference (id) ") and found this: sqlite 3. Operation error: near" references ": syntax error Your second ligne is wrong db.execute ("create table if table does not exist 2 (name text, my_id integer, foreign key (my_id) reference Maintenance (ID)) ") as explained
Comments
Post a Comment