Questions tagged [basicnamevaluepair]

A simple class encapsulating an attribute/value pair in Java. Usually used for creating HttpPost

This class comforms to the generic grammar and formatting rules outlined in the Section 2.2 and Section 3.6 of RFC 2616 2.2 Basic Rules The following rules are used throughout this specification to describe basic parsing constructs. The US-ASCII coded character set is defined by ANSI X3.4-1986.

OCTET =
CHAR =
UPALPHA =
LOALPHA =
ALPHA = UPALPHA | LOALPHA DIGIT =
CR =
LF =
SP =
HT =
<"> =

Many HTTP/1.1 header field values consist of words separated by LWS or special characters. These special characters MUST be in a quoted string to be used within a parameter value (as defined in section 3.6).

 token          = 1* 
 separators     = "(" | ")" | "<" | ">" | "@"
                | "," | ";" | ":" | "\" | <">
                | "/" | "[" | "]" | "?" | "="
                | "{" | "}" | SP | HT

A string of text is parsed as a single word if it is quoted using double-quote marks.

 quoted-string  = ( <"> *(qdtext | quoted-pair ) <"> )
 qdtext         =  ">>

The backslash character ("\") MAY be used as a single-character quoting mechanism only within quoted-string and comment constructs.

 quoted-pair    = "\" CHAR

3.6 Transfer Codings Parameters are in the form of attribute/value pairs.

 parameter               = attribute "=" value
 attribute               = token
 value                   = token | quoted-string
34 questions
0
votes
1 answer

How to send a value or string from android application to a server when a button is clicked

I want to store an integer to a button. Upon clicking the button, the application sends the integer value to the server. For the storing of integers I thought of using nameValuePairs.add(new BasicNameValuePair("gender",Integer.toString(1))); …
moonplant
  • 47
  • 1
  • 6
0
votes
1 answer

DefaultHttpClient hangs after second post request (Android)

I have a problem I have been working on for the past few hours and can't seem to figure it out for the life of me. I have an application that logs the user into my server with some data added to the httppost entity. The first time data is added to…
0
votes
1 answer

How to check if List contains a key?

I have a class that builds a HttpResponse initializer. in one of the methods that should return the BasicNameValuePair I have to check if there is a entry in the list with key or name specified by String "name". public List
Dumbo
  • 13,555
  • 54
  • 184
  • 288
-1
votes
1 answer

Syntax to process array from a POST, android?

I am passing an array to http post from my android app to php server as follows: params.add(new BasicNameValuePair("image[]", encodedImage)); Now I want all the values on image array, in my php code. How to achieve that? How to write code for…
pagalpanda
  • 150
  • 2
  • 16
1 2
3