org.openid4java.message.Message.wwwFormEncoding()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(276)

本文整理了Java中org.openid4java.message.Message.wwwFormEncoding()方法的一些代码示例,展示了Message.wwwFormEncoding()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.wwwFormEncoding()方法的具体详情如下:
包路径:org.openid4java.message.Message
类名称:Message
方法名:wwwFormEncoding

Message.wwwFormEncoding介绍

暂无

代码示例

代码示例来源:origin: org.openid4java/openid4java

  1. /**
  2. * Gets the URL where the message should be sent, where applicable.
  3. * Null for received messages.
  4. *
  5. * @param httpGet If true, the wwwFormEncoding() is appended to the
  6. * destination URL; the return value should be used
  7. * with a GET-redirect.
  8. * If false, the verbatim destination URL is returned,
  9. * which should be used with a FORM POST redirect.
  10. *
  11. * @see #wwwFormEncoding()
  12. */
  13. public String getDestinationUrl(boolean httpGet)
  14. {
  15. if (_destinationUrl == null)
  16. throw new IllegalStateException("Destination URL not set; " +
  17. "is this a received message?");
  18. if (httpGet) // append wwwFormEncoding to the destination URL
  19. {
  20. boolean hasQuery = _destinationUrl.indexOf("?") > 0;
  21. String initialChar = hasQuery ? "&" : "?";
  22. return _destinationUrl + initialChar + wwwFormEncoding();
  23. }
  24. else // should send the keyValueFormEncoding in POST data
  25. return _destinationUrl;
  26. }

代码示例来源:origin: org.openid4java/openid4java-nodeps

  1. /**
  2. * Gets the URL where the message should be sent, where applicable.
  3. * Null for received messages.
  4. *
  5. * @param httpGet If true, the wwwFormEncoding() is appended to the
  6. * destination URL; the return value should be used
  7. * with a GET-redirect.
  8. * If false, the verbatim destination URL is returned,
  9. * which should be used with a FORM POST redirect.
  10. *
  11. * @see #wwwFormEncoding()
  12. */
  13. public String getDestinationUrl(boolean httpGet)
  14. {
  15. if (_destinationUrl == null)
  16. throw new IllegalStateException("Destination URL not set; " +
  17. "is this a received message?");
  18. if (httpGet) // append wwwFormEncoding to the destination URL
  19. {
  20. boolean hasQuery = _destinationUrl.indexOf("?") > 0;
  21. String initialChar = hasQuery ? "&" : "?";
  22. return _destinationUrl + initialChar + wwwFormEncoding();
  23. }
  24. else // should send the keyValueFormEncoding in POST data
  25. return _destinationUrl;
  26. }

代码示例来源:origin: com.cloudbees/openid4java-shaded

  1. /**
  2. * Gets the URL where the message should be sent, where applicable.
  3. * Null for received messages.
  4. *
  5. * @param httpGet If true, the wwwFormEncoding() is appended to the
  6. * destination URL; the return value should be used
  7. * with a GET-redirect.
  8. * If false, the verbatim destination URL is returned,
  9. * which should be used with a FORM POST redirect.
  10. *
  11. * @see #wwwFormEncoding()
  12. */
  13. public String getDestinationUrl(boolean httpGet)
  14. {
  15. if (_destinationUrl == null)
  16. throw new IllegalStateException("Destination URL not set; " +
  17. "is this a received message?");
  18. if (httpGet) // append wwwFormEncoding to the destination URL
  19. {
  20. boolean hasQuery = _destinationUrl.indexOf("?") > 0;
  21. String initialChar = hasQuery ? "&" : "?";
  22. return _destinationUrl + initialChar + wwwFormEncoding();
  23. }
  24. else // should send the keyValueFormEncoding in POST data
  25. return _destinationUrl;
  26. }

代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps

  1. /**
  2. * Gets the URL where the message should be sent, where applicable.
  3. * Null for received messages.
  4. *
  5. * @param httpGet If true, the wwwFormEncoding() is appended to the
  6. * destination URL; the return value should be used
  7. * with a GET-redirect.
  8. * If false, the verbatim destination URL is returned,
  9. * which should be used with a FORM POST redirect.
  10. * @see #wwwFormEncoding()
  11. */
  12. public String getDestinationUrl(boolean httpGet) {
  13. if (_destinationUrl == null) {
  14. throw new IllegalStateException("Destination URL not set; " +
  15. "is this a received message?");
  16. }
  17. if (httpGet) // append wwwFormEncoding to the destination URL
  18. {
  19. boolean hasQuery = _destinationUrl.indexOf("?") > 0;
  20. String initialChar = hasQuery ? "&" : "?";
  21. return _destinationUrl + initialChar + wwwFormEncoding();
  22. } else // should send the keyValueFormEncoding in POST data
  23. {
  24. return _destinationUrl;
  25. }
  26. }

代码示例来源:origin: jbufu/openid4java

  1. /**
  2. * Gets the URL where the message should be sent, where applicable.
  3. * Null for received messages.
  4. *
  5. * @param httpGet If true, the wwwFormEncoding() is appended to the
  6. * destination URL; the return value should be used
  7. * with a GET-redirect.
  8. * If false, the verbatim destination URL is returned,
  9. * which should be used with a FORM POST redirect.
  10. *
  11. * @see #wwwFormEncoding()
  12. */
  13. public String getDestinationUrl(boolean httpGet)
  14. {
  15. if (_destinationUrl == null)
  16. throw new IllegalStateException("Destination URL not set; " +
  17. "is this a received message?");
  18. if (httpGet) // append wwwFormEncoding to the destination URL
  19. {
  20. boolean hasQuery = _destinationUrl.indexOf("?") > 0;
  21. String initialChar = hasQuery ? "&" : "?";
  22. return _destinationUrl + initialChar + wwwFormEncoding();
  23. }
  24. else // should send the keyValueFormEncoding in POST data
  25. return _destinationUrl;
  26. }

相关文章