what does 全蛋 sayis it appropriate to say 为什么有it,去掉有什么区别

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.
It is unclear to me when you should and should not return a HTTP 412: Precondition Failed, error for a web service?
I am thinking of using it when validating data.
For example, if a client POST's XML data and that data is missing a required data element, then responding with a 412 and a description of the error.
Does that align with the spirit of responding with an HTTP 412, or should something else be used (e.g. another http error code or web application exception)?
9,6781476141
1,93833577
If you look at
you'll see a number of request headers that can be used to apply conditions to a request:
If-Modified-Since
If-None-Match
If-Unmodified-Since
These headers contain 'preconditions', allowing the client to tell the server to only complete the request if certain conditions are met. For example, you use a PUT request to update the state of a resource, but you only want the PUT to be actioned if the resource has not been modified by someone else since your most recent GET.
The response status code 412 (Precondition Failed) is typically used when these preconditions fail.
Your example sounds like an invalid request (i.e. the client has submitted data that is invalid because of missing values). A status code of 400 (Bad Request) is more appropriate here IMO.
Your best bet would be to avoid 412. In practice most web services that I've used send a . A lot of frameworks have built-in support for 400 too and your clients will appreciate a more common error code. Often times, especially with REST interfaces, a simple "message" or "error" element is returned with a description.
412 is reserved for cases where the request is conditional, and the condition isn't met.
For your use case,
is a good match.
16.5k22945
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Top questions and answers
Important announcements
Unanswered questions
By subscribing, you agree to the
Stack Overflow works best with JavaScript enabled请选择年级高一高二高三请输入相应的习题集名称(选填):
科目:高中英语
来源:2012届浙江省名校新高考研究联盟高三第二次联考英语试卷(带解析)
题型:阅读理解
People who put a smiley face at the end of a message, in an attempt to show feeling, show no feeling. I wish there was a symbol for two fingers in the air.I had some bad news this week. My manager informed me of this news via email. It was like hearing about the death of a loved one via pigeon. Bad news should only ever be delivered face to face or voice to voice.We seem to celebrate our numerous methods of communication, but really there is no communication at all. I talk to my plants more than I talk to my neighbors, I get text messages that take me three hours to read because they’re written like this: “Hi, I ope you av a gr8 day. Call me La8tr.” I had an email from someone this week that read, “Da ut ov 2day are really annoying me!” Ut? I had to say this 20 times before I understood it. Youth has now become ut. Haven’t we taken enough from them—now we have to take their letters?I had an email recently from a girl who used to live over the road from me as a child. She wrote, “Hi Shazia, howz u? Im sure u used 2 live across the road from me. We sumtimes played tennis 2 gever at the park and you was in your eliment. I am married now wif 3 daughters.” Then, to my horror, she ended the email with: “Im now teachin in Leeds. Luv Clare.”Teaching? With English like this. It’s like saying you’re a train driver when you’ve never seen a train. It was like reading modern Morse code.Getting bad news via email makes it seem so much worse than it actually is. Just a few lines, no emotion, no comfort, not really an explanation. Just a few cold hard words. It’s an excuse. Just write a few words and the problem of delivering it is no longer yours. A close friend recently told me she was very happy to announce she was getting married—and made the announcement by email. I don’t know how she didn’t fall off her chair with excitement while writing it. If you are really happy or really sad to announce something important, wouldn’t you like a human reaction? Some euphoria, elation, tears, a punch in the face?I receive long text messages every day with information and explanations that I don’t bother reading. They’re boring, and annoy me. In the time it took someone to write me three laborious texts, they could have called, spoken to me, made some tea. People who put a smiley face at the end of a sentence, in an attempt to show feeling, show no feeling. I wish there was a symbol for two fingers in the air, because that’s the one I’d send back.The telegram has been responsible for reporting world-shattering events when there were very few other options(选择权). Now we have options, and people opt for the least humane one. My mum, in an attempt to get down with the ut of today, asked me to teach her to text. Now she constantly texts me in block capitals, so it looks as if she is still angry and annoyed with me after all these years.People don’t even write by hand any more. My doctor prints out prescriptio even my mechanic prints out a receipt. I get typed Christmas cards and my friends send me emails. I get very excited when hand-written letters come through my door, only because they rarely do.When I was at school, the girls used to write letters to each other, even though we sat side by side and spoke to one another all day. I think it was a way of expressing private things we were afraid to say when we were 14 and too shy. We used to write things like, “You are my best friend, can’t wait to sit next to you in math.”I miss the personal method of communication. Once the pen was mightier than the sword, now it seems the keyboard is mightier than the pen.【小题1】We can learn from paragraph 3 and paragraph 4 that the writer wants to say ________.A.the spelling mistakes in the messages make her very annoyedB.only writing letters will bring friends and neighbors much closerC.she talks to plants more because no one shares her joys and sorrowsD.gestures and the pen can express a lot more than the cold keyboard 【小题2】According to the writer, which of the following can support her opinion?A.She has been separated from all his classmates many years.B.No doctors write prescriptions by hand because of computers.C.In communication, we should write more letters than send messages.D.Less shy than school girls, boys rarely write letters to their friends.【小题3】According to the passage, we can conclude that ________.A.the writer is a person full of emotions and treasures friendship and affectionsB.the writer becomes excited when she gets priceless gifts from other peopleC.her classmates would write to each other because they couldn’t send messagesD.people put a smiley face at the end of a message just to show they are happy【小题4】What message is conveyed in the passage?A.The writer wastes much time in reading many rubbish text messages every day.B.Few people can write letters well in modern society owing to texting messages.C.Now people are too busy to communicate with each other face to face often.D.The writer prefers personal communication rather than electronic equipment.【小题5】Why does the writer mention the telegram?A.Because she thinks the annoyance of reading text messages is originated from it.B.Because we have more options to keep in touch with each other than ever before.C.Because advanced technology partly takes the blame for lacking the human touch.D.Because she thinks humans today become colder with the development of society.【小题6】Which of the following best describe the tone of this passage?A.Optimistic.B.Critic.C.Sympathetic.D.Pessimistic.
科目:高中英语
来源:2013届安徽省高三省级示范高中名校联考英语试卷(带解析)
题型:阅读理解
Are you the type of person who always says“yes”?I’ve come to learn that it is very im-portant to learn to say NO!It’s okay. People are still going to like you. They may even respect you more because they know you are honest. I,m not saying to say“no" to someone who really needs your help. I’m talking about re-fusing that meeting that you really do not want to attend or that birthday party that you don’t want to be a guest at.Think for a moment how you feel when you say YES to something that you really don’t want to do. If you’re like I once was,you can’t sleep at night and you think about it too much. It weighs on your mind. You try to find ways out. Whatever you’re saying to yourself,if you really wanted to go,you wouldn’t have all of these thoughts. So,why not just say NO from the beginning? Maybe you feel like if you don’t show up at the meeting(by the way,it is not one you must attend) your boss isn’t going to like you or your co-workers won’t respect you. Maybe you feel as if your mom,dad or sisters won’t love you as much if you don’t do everything for them that they ask every occasion. If these people are your true friends,family members,or a good boss,they will like or love you the same no matter what. People treat you the way you teach them to,and if you’re some-one who always says“yes" then that’s what they,re expecting. You need to do what is right for you. Of course we do have real obligations in life to ful-fill,but we do not have to do everything others want us to do.【小题1】Which of the following statements would the writer agree with?A.We should try to do what our friends ask us to do.B.We should help others in need.C.Always saying“yes" means you are dishonest.D.Always saying“no" means you are brave.【小题2】What does the underlined word,’ It" in Paragraph 3 refer to?A.Saying "yes".B.A friend's birthday party.C.Something you’re unwilling to do. D.Something you think difficult to do.【小题3】The writer believes that if you say“no" to your family members,you’11_·A.have the same relationship with them as beforeB.have a loose relationship with themC.disappoint themD.upset them【小题4】What would be the best title for the passage?A.Learn to Make a Right Choice B.To Be YourselfC.Do What You Want to Do D.Learn to Say No
科目:高中英语
来源:学年安徽省名校联考英语试卷(解析版)
题型:阅读理解
Are you the type of person who always says“yes”?I’ve come to learn that it is very im-portant to learn
to say NO!It’s okay. People are still going to like
you. They may even respect you more because they know you are honest.
I,m not saying to
say“no& to someone who really needs your help. I’m talking about re-fusing
that meeting that you really do not want to attend or that birthday party that
you don’t want to be a guest at.
Think for a moment how you feel when you say YES to
something that you really don’t want to do. If you’re like I once was,you can’t sleep at night and you think about it too
much. It weighs on your mind. You try to find ways out. Whatever you’re saying
to yourself,if you really wanted to go,you wouldn’t have all of these thoughts.
So,why not just say NO from
the beginning? Maybe you feel like if you don’t show up at the meeting(by the way,it is not one
you must attend) your boss isn’t going to like you or your co-workers won’t
respect you. Maybe you feel as if your mom,dad or
sisters won’t love you as much if you don’t do everything for them that they
ask every occasion.
If these people are your true friends,family members,or a good
boss,they will like or love you the same no
matter what. People treat you the way you teach them to,and if you’re some-one who always says“yes& then
that’s what they,re expecting.
You need to do what is right for you. Of course we do
have real obligations in life to ful-fill,but we do not
have to do everything others want us to do.
1.Which of the following statements would the writer
agree with?
A.We should try
to do what our friends ask us to do.
B.We should
help others in need.
C.Always saying“yes& means you are dishonest.
D.Always saying“no& means you are brave.
2.What does the underlined word,’ It& in Paragraph 3 refer to?
A.Saying
&yes&.
B.A friend's
birthday party.
C.Something you’re unwilling to do.
D.Something you
think difficult to do.
3.The writer believes that if you say“no& to your
family members,you’11_·
A.have the same
relationship with them as before
B.have a loose
relationship with them
C.disappoint
them
D.upset them
4.What would be the best title for the passage?
A.Learn to Make
a Right Choice &&&&&&&&&&&& B.To Be
Yourself
C.Do What You
Want to Do &&&&&&&&&&&&&&&& D.Learn to Say
No
科目:高中英语
来源:2009年全国各省市高考命题动态信息卷(辽宁专用)英语(五)
题型:阅读理解
  In
the atmosphere,carbon dioxide actd rather like a one-way mirror or the glass in
the roof of a greenhouse which allows the sun's rays to enter but prevents the
heat from excaping.
  According
to a weather expert's prediction,the atmosphere will be 3 warmer in the year
2050 than it is today, if man continues to burn luels at the present rate. If
this warming up took place,the ice caps in the poles would begin to melt,thus
raising sea level several meters and severely flooding coastal cities.Also,the increase in atmospheric
temperature would lead to great changes in the climate of the northern
hemisphere(半球),psooicbly
resulting in an alteration of earth's chief food growing zones.
  In
the past,concern about a man - made warming of the earth has concentrated on
the Arctic because the Antarctic is much colder and has a much thicker ice
sheet.But the weather experts are now paying more attention to West
Antarctic,which may be affected by a warming on the scale that will possibly
take place in the next fifty years from on burning of fuels.
  Satellite
pictures showthat large areas of Antarctic ice are already disappearing.The
evidence available suggests that a warming has taken place.This fits the theory
that carbon dioxide warms the earth.
  However,most
of the fuel is burnt in the northern hemisphere,where temperatures seem to be
falling.Scientists conclude,therefore,that up to now natural influences on the
weather have exceeded those caused by man.The question is:Which natural cause
has most effect on the weather?
  One
possibility is the variable behavior of the sun.Astronomers at one research
station have studied the hot spots and cold spots(that is,the relatively less
hot spots) on the sun. As the sun rotates(旋转),every 27.5 days,it presents hotter or colder faces to the
earth,and different aspects to different parts of the earth.This seems to have
a considerable effect on the distribution of the earth's atmospheric
pressure,and consequently on wind circulation.The sun is also variable over a
long term:its heat output goes up and down in cycles,the latest trend being
downward.
  Scientists
are now finding mutual relations between models of solar weather interactions
and the actual climate over many thousands of years ,including the last Ice
Age.The problem is that the models are predicting that the world should be
entering a new Ice Age and it is not.
  One
way of solving this theoretical difficulty is to assume a delay of thousands of
years while the solar effects overcome the inertia(不活动,惰性) of the earth's
climate.If this is right,the warming effect of carbon dioxide might thus be
serving as a useful counter balance to the sun's diminishing heat.
  68.It
can be concluded that a concentration of carbon dioxide in the atmosphere would
___.
   A.mean
a warming - up im the Arctic
   B.raise
the temperature of the earth's surface
   C.prevent
the sun's rays from reaching the earth's surface
   D.account
for great changes in the climate in the northern hemiphere
  69.Although
the fuel consumption is greater in the northern hemisphere,temperatures there
seem to be falling.This is _______.
   A.mainly
because the levels of carbon dioxide are rising
   B.partly
due to variations in the output of solar energy
   C.possibly
because the ice caps in the poles are melting
   D.exclusively
due to the effect of the inertia of the earth's climate
  70.On
the basis of their models,scientists are of the opinion that ________.
   A.the
climate of the world should be becoming cooler
   B.the
new Ice Age will be delayed by the greenhouse effect
   C.the
man - made warming effect helps to increase the solar effects
   D.it
will take thousands of years for the inertia of the earth's climate to take
effect
科目:高中英语
题型:阅读理解
People who put a smiley face at the end of a message, in an attempt to show feeling, show no feeling. I wish there was a symbol for two fingers in the air.I had some bad news this week. My manager informed me of this news via email. It was like hearing about the death of a loved one via pigeon. Bad news should only ever be delivered face to face or voice to voice.We seem to celebrate our numerous methods of communication, but really there is no communication at all. I talk to my plants more than I talk to my neighbors, I get text messages that take me three hours to read because they’re written like this: “Hi, I ope you av a gr8 day. Call me La8tr.” I had an email from someone this week that read, “Da ut ov 2day are really annoying me!” Ut? I had to say this 20 times before I understood it. Youth has now become ut. Haven’t we taken enough from them—now we have to take their letters?I had an email recently from a girl who used to live over the road from me as a child. She wrote, “Hi Shazia, howz u? Im sure u used 2 live across the road from me. We sumtimes played tennis 2 gever at the park and you was in your eliment. I am married now wif 3 daughters.” Then, to my horror, she ended the email with: “Im now teachin in Leeds. Luv Clare.”Teaching? With English like this. It’s like saying you’re a train driver when you’ve never seen a train. It was like reading modern Morse code.Getting bad news via email makes it seem so much worse than it actually is. Just a few lines, no emotion, no comfort, not really an explanation. Just a few cold hard words. It’s an excuse. Just write a few words and the problem of delivering it is no longer yours. A close friend recently told me she was very happy to announce she was getting married—and made the announcement by email. I don’t know how she didn’t fall off her chair with excitement while writing it. If you are really happy or really sad to announce something important, wouldn’t you like a human reaction? Some euphoria, elation, tears, a punch in the face?I receive long text messages every day with information and explanations that I don’t bother reading. They’re boring, and annoy me. In the time it took someone to write me three laborious texts, they could have called, spoken to me, made some tea. People who put a smiley face at the end of a sentence, in an attempt to show feeling, show no feeling. I wish there was a symbol for two fingers in the air, because that’s the one I’d send back.The telegram has been responsible for reporting world-shattering events when there were very few other options(选择权). Now we have options, and people opt for the least humane one. My mum, in an attempt to get down with the ut of today, asked me to teach her to text. Now she constantly texts me in block capitals, so it looks as if she is still angry and annoyed with me after all these years.People don’t even write by hand any more. My doctor prints out prescriptio even my mechanic prints out a receipt. I get typed Christmas cards and my friends send me emails. I get very excited when hand-written letters come through my door, only because they rarely do.When I was at school, the girls used to write letters to each other, even though we sat side by side and spoke to one another all day. I think it was a way of expressing private things we were afraid to say when we were 14 and too shy. We used to write things like, “You are my best friend, can’t wait to sit next to you in math.”I miss the personal method of communication. Once the pen was mightier than the sword, now it seems the keyboard is mightier than the pen.1.We can learn from paragraph 3 and paragraph 4 that the writer wants to say ________.A.the spelling mistakes in the messages make her very annoyedB.only writing letters will bring friends and neighbors much closerC.she talks to plants more because no one shares her joys and sorrowsD.gestures and the pen can express a lot more than the cold keyboard2.According to the writer, which of the following can support her opinion?A.She has been separated from all his classmates many years.B.No doctors write prescriptions by hand because of computers.C.In communication, we should write more letters than send messages.D.Less shy than school girls, boys rarely write letters to their friends.3.According to the passage, we can conclude that ________.A.the writer is a person full of emotions and treasures friendship and affectionsB.the writer becomes excited when she gets priceless gifts from other peopleC.her classmates would write to each other because they couldn’t send messagesD.people put a smiley face at the end of a message just to show they are happy4.What message is conveyed in the passage?A.The writer wastes much time in reading many rubbish text messages every day.B.Few people can write letters well in modern society owing to texting messages.C.Now people are too busy to communicate with each other face to face often.D.The writer prefers personal communication rather than electronic equipment.5.Why does the writer mention the telegram?A.Because she thinks the annoyance of reading text messages is originated from it.B.Because we have more options to keep in touch with each other than ever before.C.Because advanced technology partly takes the blame for lacking the human touch.D.Because she thinks humans today become colder with the development of society.6.Which of the following best describe the tone of this passage?A.Optimistic.B.Critic.C.Sympathetic.D.Pessimistic.}

我要回帖

更多关于 what fox say 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信